I have a Primeface
selectBooleanCheckbox
in a column of a DataTable. Inside there is a <p:ajax
that on check calls the method in the listener (mybean.checkCell(cell.field2))
and saves the status of the checkbox.
My problem is that the entire p:dataTable
is refreshed when I check.
How do I call mybean.checkCell(cell.field2)
without refreshing the whole dataTable?
Here is my code:
<p:dataTable var="cell" value="#{mybean.mycells}" widgetVar="cell" emptyMessage="No cells" filteredValue="#{mybean.filteredCells}">
<p:column filterBy="#{cell.field1}" headerText="Field1" filterMatchMode="contains">
<h:outputText value="#{cell.field1}" />
</p:column>
<p:column headerText="Checkbox">
<p:selectBooleanCheckbox value="#{cell.check}" partialSubmit="true">
<p:ajax process="@this" partialSubmit="true" update=":form:messages" listener="#{mybean.checkCell(cell.field2)}" onstart="PF('statusDialog').show();" oncomplete="PF('statusDialog').hide();" />
</p:selectBooleanCheckbox>
</p:column>
</p:dataTable>