On Sat, 2008-01-05 at 00:44 +0800, Damar Thapa wrote:
> Hi,
> 
> I have the following snapshot:
> 
> <h:selectOneRadio id="myRadio" value="#{email.htmlOrText}" >
>                     <f:selectItem itemValue="text" itemLabel="Text"/> 
>                     <f:selectItem itemValue="html" itemLabel="Html"/>
>                      <a4j:support event="onchange" reRender="body" />
>   </h:selectOneRadio> 
>       
> <div id="body">         
>                 <c:if test="{$email.htmlOrText = 'text'}">
>                           <h:inputTextarea value="#{email.bodyEmail}"
> cols="70" rows="15" /> 
>                   </c:if>
>                   <c:if test="{$email.htmlOrText = 'html'}">
>                           <t:inputHtml value="#{email.bodyEmail}"
> addKupuLogo="false"/> 
>                 </c:if>
> </div>
> 
> What I am trying to do is:  when the  value of  radio button is
> changed, it should render "body" part, in which ther are two <c:ifs.
> 
> How can I force it to render the body part as the user changes the
> value of oneselectRadio button?

Do not use c:if. Do this instead:
  <h:inputTextarea rendered="#{email.htmlOrText == 'text'}" .../>
  <h:inputHtml rendered="#{email.htmlOrText == 'html'}" .../>

Regards,

Simon

Reply via email to