You must capture the rowSelect event for a dataTable that has a row selection based on a checkbox. The code is as follows:
<p:ajax event="rowSelect" listener="#{articleBean.onRowSelect}"
oncomplete="articleBean.onSelection" />
<p:ajax event="rowUnselect" listener="#{articleBean.onRowUnselect}"
oncomplete="articleBean.onSelection" />
<p:column id="name" headerText="Select" selectionMode="multiple"
style="width:18px" />
I can not understand the behavior. When I check the box for the first time, the onRowSelect method is called. When I deselect, "onRowUnselect" will not be called. In addition, the onRowSelect method is called only once for the grid, as if I click on any other flag, the event does not fire. Am I missing something? Not able to understand this behavior.
Thanks Shikha
source
share