Board index JavaServer Faces General How to peform an AJAX process before p:dataTable page change

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

Components, Ajax Framework, Utilities and More.


Posts: 133
Location: Courtallam, India

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


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


Posts: 133
Location: Courtallam, India

The question was in the context of using something like
<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


Return to General