i currently have the problem with a selection in a datatable. I tried to use the primefaces selection mode, but the header selection checkbox only selects the entries on the first page. The other rows from different pages will not be selected:
Code: Select all
<p:dataTable
id="myTable"
widgetVar="myTable"
var="entry"
rowKey="#{entry.id}"
selection="#{mySessionBean.selected}"
rows="#{mySessionBean.pageSize}"
rowsPerPageTemplate="#{mySessionBean.pageSizeTemplate}"
reflow="true"
rowHover="true"
paginator="true"
paginatorPosition="BOTH"
paginatorAlwaysVisible="false"
pageLinks="10"
caseSensitiveSort="false"
sortMode="single"
value="#{mySessionBean.entries}">
<p:ajax event="sort" listener="#{mySessionBean.tableSettings.prepare}" />
<p:column selectionMode="multiple" style="width:16px;text-align:center" />
Code: Select all
<p:column selectionMode="multiple" style="width:16px;text-align:center">
<f:facet name="header">
<p:selectBooleanCheckbox onchange="PF('myTable').selectAllRows();" />
</f:facet>
</p:column>
If it is wanted behaviour, how can i achieve the selection of all entries in my bean, instead of only the entries on the first page?
Wbr,
Daniel