2 Replies Latest reply on Aug 28, 2007 12:15 PM by Tim

    js error with togglecontrol in mode client

    liumin hu Master


      <rich:togglePanel id="panel"
       initialState="panelB" switchType="client"
       <f:facet name="panelA">
       <f:facet name="panelB">
       <f:facet name="panelC">
      <rich:toggleControl for="panel" value="Switch"/>
      <rich:toggleControl for="panel" value="panelA " switchToState="panelA" />
      <rich:toggleControl for="panel" value=" panelB" switchToState="panelB" />
      <rich:toggleControl for="panel" value=" panelC " switchToState="panelC" />

      the first togglecontrol works, when i click on the others, i got a js error.
      $(element) has no properties

        • 2. Re: js error with togglecontrol in mode client
          Tim Newbie

          Please reopen the JIRA ticket. It didn't get fixed on 3.1.0 RC3. I post comment there.
          I still see problem in 3.1.0RC3. There are 2 problems:
          1/ if stateOrder is not specified, it displays nothing.
          2/ if switchToState is defined, click on link will hide everything.

          <ui:define name="sidebar">
          <rich:toggleControl for="application:panel1" value="Show first" switchToState="first"/><br/>
          <rich:toggleControl for="application:panel1" value="Show second" switchToState="second"/><br/>
          <rich:toggleControl for="application:panel1" value="Show third" switchToState="third"/><br/>
          <ui:define name="body">
          <h:form id="application">
           <h:messages globalOnly="true" styleClass="message"/>
          <rich:togglePanel id="panel1" switchType="client" initialState="first" stateOrder="first,second,third">
           <f:facet name="first">
           <f:facet name="header">First!</f:facet>
           First Panel
           <f:facet name="second">
           <f:facet name="header">Second!</f:facet>
           Second panel
           <f:facet name="third">
           <f:facet name="header">Third!</f:facet>
           Third panel