I have p:datatable as
<p:dataTable id="tasktable" rows="5" paginator="true" paginatorPosition="bottom" rowsPerPageTemplate="5,10,25" editable="true" editMode="row" reflow="true"
value="#{taskBean.taskList}" selectionMode="multiple" binding="#{table}" rowKey="#{currentrow[0]}" selection="#{taskBean.selectedTaskList}" var="currentrow"}">
<p:column headerText="Select" id="checkboxSelect" selectionMode="multiple" styleClass='text-md-center com-wdth-5 white'>
</p:column>
<f:facet name="header">
<div>
<p:commandButton id="toggler" type="button" value="Select Columns" icon="ui-icon-calculator" styleClass="btn ad-btn-danger padd mr-b0"/>
<p:columnToggler datasource="tasktable" trigger="toggler" />
</div>
</f:facet>
<p:column id="sno" styleClass="com-wdth-5">
<f:facet name="header"> #{msg['CHSN']} </f:facet>
<h:outputLabel value="#{table.rowIndex + 1}"/>
</p:column>
.
.
.
<p:ajax event="rowSelect" listener="#{taskBean.onRowSelect}" update="@form"/>
</p:dataTable>
With event="rowSelect" and selectionMode multiple, With backing bean code as
public void onRowSelect(SelectEvent event) {
System.out.println("selectedTaskList = "+selectedTaskList.size());
}
But this rowSelect is never fired and checkbox are not selectable, but if I remove selectionMode="multiple" from p:dataTable, selection enables but still event is not fired. And selectedTaskList is just an arrayList defined globally as: private List selectedTaskList = new ArrayList<>();