'd like to disable/enable SelectManyCheckbox and the SelectOneMenu based on my selection. I have two radio buttons to be selected whether A or B. The SelectManyCheckbox and the SelectOneMenu should be disabled at the first run. When the user selects “A” the SelectManyCheckbox and the SelectOneMenu should be enabled and if the users selects “B”, the SelectManyCheckbox and the SelectOneMenu should be disabled and the items should be empty. I tried to use <f:ajax render="certificates"/>, but it doesn't work properly.
I do not recommend coding anything but the simplest expressions in EL. EL is a to debug, and it risks violating the Separation of Concerns contract of MVC.
Also, specifically, it appears that the way character literal comparisons are done varies depending on server implementations. In some, user. hrRequest == ‘B’ will be done as a straight character-to-character conversion. In others, one or both operands will be promoted to "int" values.
So I prefer the more abstract (and safer) version:
Paired, of course, with an "isRequestB()" read-only property accessor methond on the "user" bean.
Although your biggest problem seems to be that I cannot find any controls whose ID is "certificates" in your sample. Only a "hrcertificates".
I'm going to be a "small government" candidate. I'll be the government. Just me. No one else.