In JSF disabled/readonly field's setters don't get called and hence the backing bean would never have the value of disabled field, be it check box or input text fields etc. What to do if I need value of disabled fields in fields mapped at bean? How can I force setters to get called so that it set the value back? Any suggestion/help will be highly appreciated.
You could either disable the fields on client side with javascript or jQuery instead of using JSF's disabled="true" e.g. with jQuery:
See this post for details: How to disable an input with jQuery?
Or you could submit the disabled input field values as hidden fields together with your form
<h:inputHidden value="#{myBean.myValue}" />
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