Am i missing something or PF 12.0.0 DataTable selection is not working as expected when using disabledSelection?
<p:column selectionMode="multiple">) selects all rows (not just selectable ?!) - by this i mean, browser is sending form parameter myForm:myTable_selection:@all and then server sets every list item from value to selection - at the same time, only selecteble rows are checked on client sideselectionMode=multiple is present in p:dataTable then it's not working at all (by 'not working at all' i mean client-side checkboxes are all disabled without console error logs)? Only if selectionMode is omitted it's working but still, because of 2) i need to filter out rows on server side manuallyI'm using something like this (without Ajax events for row select)
<h:form id="tblForm">
<p:dataTable id="myTable" widgetVar="myTableWv" value="#{myBean.list}" var="item" size="small"
sortBy="#{myBean.defaultSort}" filterBy="#{myBean.defaultFilter}"
selection="#{myBean.listOfSelected}" selectionPageOnly="false"
rowKey="#{item.id}" disabledSelection="#{myBean.shouldDisable(item)}">
<p:column selectionMode="multiple" />
<p:column>
<f:facet name="header">
<p:commandButton process="@this myTable" action="#{myBean.doSomethingWithSelectedItems}" />
</f:facet>
</p:column>
</p:dataTable>
</h:form>
Edit: 12.0.2 release notes are saying 1) is solved
Edit2: It's not working only when selectionPageOnly=false is used
OK turns out it was a similar issue to previously reported. The issue was not checking if the selection was also disabled!
Fixed here for 13.0: https://github.com/primefaces/primefaces/pull/9553
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With