0
<p:outputLabel value="#{bundle.CreateDoctorsLabel_patio}" for="patio" />
<p:inputText id="patio" widgetVar="widgetPatio" value="#{doctorsController.selected.patio}"
             title="#{bundle.CreateDoctorsTitle_patio}" required="true" 
             requiredMessage="#{bundle.CreateDoctorsRequiredMessage_patio}" 
             disabled="true" />

This field is filled from another field via javascript.

The problem is: when it's disabled it pass "null" to controller, and if I remove the attribute "disabled" it gets the value normally.

I've tested already the attribute "readonly" and happens the same.

Does someone have any solution?

developer033
  • 24,267
  • 8
  • 82
  • 108
  • Next time please try using a searchengine first: https://www.google.nl/search?q=jsf+disabled+input+submits+null – Kukeltje Nov 06 '15 at 07:21
  • Dude, I 've looked , but definitely nothing that I found works. So I wanted any solution to make it work. Anyway, thanks for you help.... – developer033 Nov 06 '15 at 22:47
  • There were no clear signs you tried dude. So then please tell me the search terms you used, dude, because you clearly failed there and maybe I can teach you something. Ajd if you did find the duplicate posts and they did not work, **tell us, mention those things** as stated in all topica about asking good questions. Goodluck in the future – Kukeltje Nov 07 '15 at 08:33
  • The unique solution that I found that works was this: [readonly](http://stackoverflow.com/questions/24088759/validate-readonly-components-anyway-on-form-submit/24089336#24089336), **which obviously** don't do what I need, it works only with "readonly" not with "disabled", I want "disable" because I can call PF('ID').enable()/disable() on my JS file based on another input selection. The only useful things I found was something like: "You can't submit form with disable items in JSF", so that's why I'm asking in the forum. Anyway, as you can't give me a solution, thanks anyway and good luck. – developer033 Nov 07 '15 at 18:32
  • And **no**, there's no duplicate question, the other links want something with "readonly", not with "disabled". – developer033 Nov 07 '15 at 18:35

0 Answers0