2 Replies Latest reply on Oct 22, 2007 3:04 AM by Ralf

    reRender togglePanel don't work

    Andreas Franke Apprentice

      Hi,

      I try to switch togglePanel on selectOneRadio change event. But content won't switch

      <div id="searchBody">
       <h:form id="toggleform">
       <h:selectOneRadio layout="pageDirection" value="#{toggleTest.initialState}">
       <f:selectItem id="item1" itemValue="saison" itemLabel="Sommersaison"/>
       <f:selectItem id="item2" itemValue="time" itemLabel="Wintersaison"/>
       <a:support event="onchange" reRender="toggleform:togglepanel"></a:support>
       </h:selectOneRadio>
       <rich:separator align="center" height="2" lineType="dotted" width="75%"></rich:separator>
      
       <rich:togglePanel id="togglepanel" switchType="ajax" initialState="#{toggleTest.initialState}" stateOrder="#{toggleTest.stateOrder}">
       <f:facet name="saison">
       <h:outputText value="saison"></h:outputText>
       </f:facet>
       <f:facet name="time">
       <h:outputText value="time"></h:outputText>
       </f:facet>
       </rich:togglePanel>
       </h:form>
       </div>




        • 1. Re: reRender togglePanel don't work
          Andreas Franke Apprentice

          here additional infos

          the java code

          @Name("toggleTest")
          public class ToggleTest {
           private String initialState;
           private String stateOrder;
          
          
          
           public ToggleTest() {
           initialState="time";
           stateOrder="saison, time";
           }
          
          
          
           public String getInitialState() {
           return initialState;
           }
          
          
          
           public void setInitialState(String initialState) {
           this.initialState = initialState;
           }
          
          
          
           public String getStateOrder() {
           return stateOrder;
           }
          
          
          
           public void setStateOrder(String stateOrder) {
           this.stateOrder = stateOrder;
           }
          
          }
          


          the initialState is set to time. Than I can switch from time to saison panel, but not in the other direction. If initialState is saison I can't switch - not form saison to time and not from time to saison.
          What I do wrong?


          • 2. Re: reRender togglePanel don't work
            Ralf Newbie

            If you are using IE try to use the onclick event. IE fires the event only when you leave the field.