« Return to Thread: inputHidden and disabled form fields are lost

Re: inputHidden and disabled form fields are lost

by Rene Guenther :: Rate this Message:

Reply to Author | View in Thread

---- "René Günther" <rene.guenther@innflow.com> schrieb:
> I am updating an object with a JSF form. I got some inputHidden fields and
> one selectOneMenu which is disabled when I update (instead of adding) the
> object. I got some required fields. If I clear the content of a required
> field and submit the form, the values of inputHidden fields and of the
> disabled selectOneMenu are lost in the response. If I just update some data
> without omitting a required field everything works fine: so the setter
> methods seem to work but when rendering the response after validation
> errors, the getter methods for the inputHidden fields return null.
>
> Any suggestions what I could do?
>

I'm not sure what is happening with your hidden fields. Those are not marked "disabled" are they?
I forgot about the side effects of the disabled property. But the hidden fields are not disabled and they only get lost when validation errors occur. If I "replace" inputHidden with saveState it works.

Regards
René

 « Return to Thread: inputHidden and disabled form fields are lost