0

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>
Athafoud
  • 2,898
  • 3
  • 40
  • 58
Gyonder
  • 3,674
  • 7
  • 32
  • 49
  • This is not the default behavior. Cause of problem is not visible in information provided so far but you can find debugging hints in http://stackoverflow.com/q/2118656 – BalusC Aug 11 '16 at 07:20
  • So it shouldn't do refresh the whole dataTable? If yes, maybe you have an idea about what could be wrong? – Gyonder Aug 11 '16 at 07:21
  • @Gyonder: read the comment by BalusC again... it requests **you** to **do** things, not ask questions ;-) – Kukeltje Oct 18 '16 at 13:16

1 Answers1

0

You are updating the component specified in update=":form:messages" everytime click the checkbox. I guess "messages" ID belongs to a container where the datatable is in. If it is not right, i don't understend why the databled gets updated. If it is right, just delete the update attribute or update something that does not contain the datatable inside.