P: ajax pagination event lazy p: dataTable

I am having trouble finding an ajax event that my javascript will execute when my list is updated during the lazy loading of my datatable. This javascript is responsible for updating the cover art of the image based on my list, which gets repopulated during the initial data loading, when paginated, and changes the number of records on the page. Any help with finding a way to make the event execute my javascript is greatly appreciated in these situations! Thanks in advance!

Charts 3.3.1 Mojarra 2.1.5 JBoss AS 7.1.0.Final

+4
source share
2 answers

Not defined for Lazy Loading:

To run the js function after pagination, use p:ajax event="page" (it can also work to change the number of records per page)

Like this

 <p:ajax event="page" oncomplete="myJsFunction();"></p:ajax> 

Additional event types

page - On the page.

sort - when sorting a column.

filter - filtering.

rowSelect - row selection.

rowUnselect - If no row is selected.

rowEdit - when editing a row.

rowEditCancel - When row editing is canceled.

colResize - when selecting a column.

toggleSelect - when switching the header.

colReorder - when reordering columns.

rowSelectRadio - select a row from the radio.

rowSelectCheckbox - select a row using a checkbox.

rowUnselectCheckbox - Invalid selection of a row with a flag.

rowDblselect - double-click row selection

rowToggle - expand or collapse a row.

contextMenu - Display ContextMenu.

(Adapted from the section user manual )

+17
source

Examples 6.2 provide a complete list of dataTable events.

: sort page
filter
rowSelect
rowUnselect
rowEdit
rowEditInit
rowEditCancel
colResize
toggleSelect
colReorder
Contextual
rowSelectRadio
rowSelectCheckbox
rowUnselectCheckbox
rowDblselect
rowToggle
cellEditInit
cellEdit
rowReorder
swipeleft
swiperight
click
taphold
cellEditCancel

from docs: javax.faces.component.behavior.ClientBehaviorHolder.getEventNames ()

0
source

All Articles