I have an inputText on my JSF page and a JavaScript calendar popup is attached to it. Conditionally I'm setting the inputText disabled property to true and false.
When I set disabled = true
and when I then write JSF values to the database, the value in inputText is null. I believe this is due to the disabled = true
.
Is there any way to retain the value in the inputText box even though disabled = true
?
I am using JSF 1.1.
Another workaround would be to temporarily enable this input when submitting the form, and after model is updated, disable it again. There also was some solution with using hidden input with the same id, but unfortunately I don't remember how it exactly works.
You should try readonly=true instead of disabled=true (just like in plain HTML)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With