Why is ajax cellEdit event sending @this regardless of value of the process attribute?
Posted: 16 Jul 2017, 14:34
My client implements a treeTable as shown below:
I noticed that when I edit any field in the treeTable ajax submits all the rows of the treetable. In order to reduce the amount of data sent from the client to the server, I experimented with the process attribute but was unable to get ajax to only send the edited field or the current row. As a test, I made the following change to the process attribute of my treeTable.
When I observed the Network traffic using the Chrome developer tools, I noticed that the javax.faces.partial.execute value included the row 1 ID as expected but also include the treeTable ID.
When I reviewed my other tests, I confirmed that ajax always sends the treeTable ID regardless of the value of the process attribute so it appears to be impossible to limit treeTable to sending anything less than the entire table.
Is there a reason for this behaviour?
The following are some similar links:
https://stackoverflow.com/questions/162 ... jax-submit
https://stackoverflow.com/questions/230 ... -selection
Code: Select all
<p:treeTable
id="steps"
value="#{checklistPC.treeNode}"
var="step"
paginator="false"
editable="true"
editMode="cell"
reflow="true">
<p:ajax
event="cellEdit"
listener="#{checklistPC.onCellEdit}"
partialSubmit="true"
process="@this" />
,,,,
Code: Select all
<p:treeTable
id="steps"
value="#{checklistPC.treeNode}"
var="step"
paginator="false"
editable="true"
editMode="cell"
reflow="true">
<p:ajax
event="cellEdit"
listener="#{checklistPC.onCellEdit}"
partialSubmit="true"
process="@([data-rk='1')" />
,,,,
When I reviewed my other tests, I confirmed that ajax always sends the treeTable ID regardless of the value of the process attribute so it appears to be impossible to limit treeTable to sending anything less than the entire table.
Is there a reason for this behaviour?
The following are some similar links:
https://stackoverflow.com/questions/162 ... jax-submit
https://stackoverflow.com/questions/230 ... -selection