On 11/30/05, Simon Kitching <[EMAIL PROTECTED]> wrote: > > Basically, UIInput *does* need to include the submitted value in > > saveState(), and UIData does need to save _rowState. > > So would saving the state if-and-only-if rendered=false work around > this? For most cases the component would be rendered, so saved state > would not be needed.
No, you need to save the state whether or not the component is rendered, because you might programatically toggle "rendered" on and then off and need the state; conversely, a componet might not have its "encodeXyz" mehod called even though "rendered" is true for it and all of its parents, because a parent might choose not to render a child. > > BTW, an independent reason why you have to save _rowState: > > if you have component in a table (checkboxes, say) that are > > not EL bound, but simply store their value locally, even though > > you might successfully get the value resubmitted on a subsequent > > request, you'll get lots of incorrect ValueChangeEvents since > > the prior value has been forgotten. > > So would it be adequate to also save state for components where the > "value" attribute is a literal (not an EL expression)? Again, this would > seem to make it unnecessary to save state in *most* cases. No, it's not sufficient; the examples get a little more contrived, but you really do have to take the hit of saving this state if you want correct behavior. -- Adam
