I am submitting a form in prime faces with two text fields which are read only. I am setting value in them using JavaScript. But when I submit the form then in manage bean value of both text filed is null
. If I however, remove read only, then it works fine. Please tell me the way out?
Asked
Active
Viewed 967 times
1
-
1if you use `disabled` attribute of jsf, it prevents fields from being submitted. try disabling them using javascript/jquery. – tt_emrah Apr 04 '15 at 18:32
-
I don't want to disable the text fields – TechChain Apr 04 '15 at 18:34
-
2possible duplicate of [JSF readonly inputText issue](http://stackoverflow.com/questions/18693205/jsf-readonly-inputtext-issue) – DavidS Apr 04 '15 at 18:57
-
3The linked question will indeed tell you how exactly you will be able to retrieve the value of `readonly` input components. It is not only about validation. Validation is not performed because `readonly` is set to `true` there. – Tiny Apr 04 '15 at 21:11
-
use hidden tag (h:inputHidden) to get values in manage bean. – Bhavin Panchani Apr 05 '15 at 07:04