Ajax Event page on Datatable Lazy Loading

UI Components for JSF
Post Reply
jopasa
Posts: 3
Joined: 09 Apr 2011, 18:15

24 Nov 2011, 09:26

Hi

I have implemented a lazy loading datatable like: http://www.primefaces.org/showcase-labs ... leLazy.jsf
In Primefaces3.0 M4 User Guide on Page 136 at Ajax Behavior Events there is an event called page (fired on pagination). After changing a page of data(=pagination and execution of load in LazyDataModel) i want to update an outputText, but the event is not fired and the value is not updated.
Note: If i change the event="page" to event="rowSelect" and select a row after pagination it works fine. Look at code snipped below:

Code: Select all

<p:datatable ......>
<p:ajax event="page" update="myText"/>
<h:outputText id="myText" value="#{myController.myText}"/>
</p:datatable>
I am using Primefaces3.0 RC1 and Glassfish3.1.1 Mojarra2.1.3.
Edit: It also failed with Primefaces 3.0 M4.

Thanks

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

25 Nov 2011, 05:59

Interesting and good find; since it's documented and not working, then it must be a bug. Please open a bug ticket/request.
Ajax Behavior Events
DataTable provides many custom ajax behavior events for you to hook-in to various features.
Event Listener Parameter Fired
page org.primefaces.event.data.PageEvent On pagination.
sort org.primefaces.event.data.SortEvent When a column is sorted.
filter - On filtering.
rowSelect org.primefaces.event.SelectEvent When a row is being selected.
rowUnselect org.primefaces.event.UnselectEvent When a row is being unselected.
rowEdit org.primefaces.event.RowEditEvent When a row is edited.
colResize org.primefaces.event.ColumnResizeEvent When a column is being selected.
Last edited by smithh032772 on 13 Dec 2011, 00:17, edited 1 time in total.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

jopasa
Posts: 3
Joined: 09 Apr 2011, 18:15

25 Nov 2011, 14:07

NetBeans 7.1 Beta, GlassFish 3.1.1, Java EE 6, PrimeFaces 3.0.RC1-SNAPSHOT, and Mojarra 2.1.3

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

13 Dec 2011, 00:20

@jopasa, click URL below, see my recommended solution, and compare your xhtml/jsf code to the xhtml/jsf code that is at the very top/beginning of the discussion (Cool Mr. Ice's first/initial) post, and then use my recommended solution, and let me know if that works for you.

viewtopic.php?f=3&t=16813#p51239

Also, please note, below, that I'm using 3.0.RC1 release.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests