This content has been marked as final.
Show 3 replies
-
1. Re: Need help on selectOneMenu
panky_p Aug 4, 2009 10:29 AM (in response to romadatta)Is "Other" option in selectOneMenu list coming from database?
<h:selectOneMenu value="#{myBean.selectedVal}" disabled="#{myBean.selectedVal == "Other"}"> <f:selectItems value="#{myBean.selectionList}" /> <a4j:support event="onchange" reRender="myForm" /> //try container here instead of rendering form </h:selectOneMenu> <f:subview rendered="#{myBean.selectedVal == "Other"}"> //Check for String "Other" or whatever option name you have <h:inputText value="#{myBean.inpValue}"/> </f:subview>
In my case it is working solution as the "Other" option is in selectOneMenu list. -
2. Re: Need help on selectOneMenu
romadatta Aug 5, 2009 11:53 AM (in response to romadatta)Hi,
Thanks for the reply. But i was wondering, as the Other option is not the part of database. -
3. Re: Need help on selectOneMenu
panky_p Aug 6, 2009 1:46 AM (in response to romadatta)ok, then I think you will need to add Other option value to your selectOneMenu list explicitly.