Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0.7 beta, 1.0.8 beta
-
None
-
None
Description
I'm proposing a new attribute (saveModel) for x:dataTable that can be true/false (default is false).
When "true", the bean that is associated with the "value" attribute would be stored in the component tree. I'm going to look to the <x:saveState> tag for guidance on this, but the idea would be that you do not have to use <x:saveState> tag for this purpose once the feature is implemented.
The saved value of the data model would be restored during the Restore View phase. Among other things, this would allow actions to be applied to the component with the row index corresponding to the one the user clicked even if the data store used has since changed. Just before the Render Response phase, the component could use the binding expression combined with the bean management facility to create an updated version of the data model which is then saved to the client state and rendered.
This way you have the best of both worlds. You can have value change and action events based on a comparisson of the same data that was used for the original response and the user will still see the latest data when the response is encoded.