Working with the next table, I am not able to fire the listener when I select a row clicking the checkbox. Does somebody know what I am doing wrong?
Thanks!
<p:dataTable
var="department" value="#{departmentCtrl.departmentTable}"
selection="#{departmentCtrl.departmentList}">
<p:ajax event="rowSelectCheckbox" listener="#{departmentCtrl.departmentSelected}" />
<p:column selectionMode="multiple" />
<p:column headerText="#{msgs.id}">
<h:outputText value="#{department.id}" />
</p:column>
<p:column headerText="#{msgs.name}">
<h:outputText value="#{department.name}" />
</p:column>
</p:dataTable>
public void departmentSelected(SelectEvent event) {
//This method never executes ¿?
}
I want to do the same as in the Checkbox Based Selection sample (http://www.primefaces.org/showcase-labs/ui/datatableRowSelectionRadioCheckbox.jsf); but working with the rowSelectCheckbox and rowUnselectcheckbox events as stated in the documentation (pg 141 of Primefaces USER’S GUIDE v3.3)