This content has been marked as final.
Show 2 replies
-
1. Re: disabling/enabling component with ajax not working
healeyb Apr 26, 2012 9:01 AM (in response to jn.colin)1 of 1 people found this helpfulThe code is fine and I can think of only two things:
1. Is the xhtml inside a h:form?
2. I'd expect that you'd need to use @ViewScoped or @SessionScoped not @RequestScoped.
Regards,
Brendan.
-
2. Re: disabling/enabling component with ajax not working
jn.colin Apr 26, 2012 11:13 AM (in response to healeyb)You are perfectly right, using ViewScoped instead of RequestScoped helped.
But still I don't get what's going wrong when using a RequestScoped bean:
- I click the checkbox, with a partial submit that updates the model
- then, on the form submit, because the disabled attribute is dependent on the value updated at step 1, it should be set to true, and thus get the field validated and updated in the model too
In other words, I don't understand why the textfield is still considered disabled on the backend, while it is enabled in the UI
Regards
Jean-Noël