This content has been marked as final.
Show 2 replies
-
1. Re: Hide/show rich:panels based on h:selectOneMenu value
nbelaevski Sep 9, 2009 2:29 PM (in response to oneworld95)Hi,
1. Using immediate="true" presumes that model (bean properties values) are not updated
2. Plain JSF doesn't support such type of expressions:#{webencode.checkRequestType('program')}
- are you using JBoss EL extensions?
3. Bean should have scope that is spanning several requests, e.g. session or conversation. -
2. Re: Hide/show rich:panels based on h:selectOneMenu value
oneworld95 Sep 9, 2009 3:17 PM (in response to oneworld95)Thanks, nbelaevski. Yes, this is using JBoss. I took the immediate="true" and it seems to be working; I also changed the control to a radio button set and used onclick as the event trigger -- onchange doesn't work for radio buttons, only dropdown boxes:
<a4j:outputPanel> <h:selectOneRadio value="#{webencode.requestType}" id="rdoRequestType" styleClass="radio" layout="pageDirection" > <f:selectItem itemValue="program" itemLabel="Series or Program"/> <f:selectItem itemValue="special" itemLabel="Special"/> <a4j:support ajaxSingle="true" event="onclick" reRender="program"/> </h:selectOneRadio></a4j:outputPanel> <a4j:outputPanel id="program"> <rich:panel rendered="#{webencode.checkRequestType('program')}"> program </rich:panel> <rich:panel rendered="#{webencode.checkRequestType('special')}"> special </rich:panel> </a4j:outputPanel>