How to peform an AJAX process before p:dataTable page change

UI Components for JSF
Post Reply
User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

02 Nov 2011, 23:25

I am using <p:ajax event="page" ... /> for a paginated p:dataTable

But the ajax request gets fired after the page is changed. How to do process the input elements in the page that was displayed previous to the page change?
PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

annie
Posts: 2
Joined: 02 Nov 2011, 19:55

03 Nov 2011, 05:04

In case the page changes and if you're using jQuery for ajax, try handling event using live() method.

User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

03 Nov 2011, 07:19

The question was in the context of using something like

Code: Select all

<p:dataTable  id="qlisttbl" widgetVar="qlisttbl"  paginator="true" rows="1"   value="#{freeExamDeliveryAction.examToDeliver.questionCollection}" var="q">

                            <p:ajax event="page" process="somecomponentID"/>
This somecomponentID component content varies for each page. Hence when we switch to a different page (say from page 2 to page 5) and then again come back to page 2, I dont see the state saved and retained.
PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests