In my JSF 2-based application, I have a form that includes (among other interface components) some checkboxes.
On the flags, I registered ajax requests that fire when they are checked. Ajax requests will actually just update the value of another flag in the bean database. As a result, another flag will also be checked (when it is re-displayed), since it will accept the updated value from the backup bean in the rendering response phase).
This works fine until the entire form is submitted and validation errors are made. Then the ajax requests still work and change the value based on the bean, but in the phase of re-rendering the updated flag, the value for it is not taken from the backup bean, but from the cached value, which is taken from the ComponentStateHelper
class.
As far as I understand, this is used for the new JSF 2 function to store only partial changes in the component tree.
I do not understand: how is this connected with the verification phase? Why StateHelper
class have a cached value for my flag when it encounters validation errors?
source share