3 Replies Latest reply on Jul 31, 2012 4:05 AM by monical

    Error on pages TogglePanelManager is not defined

    monical

      Hallo

       

      We are using richfaces 3.3.4 and using rich:togglePanel on our frame page that is used through out the system but we are getting an error the whole time Message: 'TogglePanelManager' is undefined. If I look in firefox it seems that it is complaining about this line "<script type="text/javascript">TogglePanelManager.add(new TogglePanel("j_id24", $A(["panelA"]), "panelA"));</script>". Can anyone perhpas shead some light on my problem, cause I am a bit lost on this one.

       

      Thank you

      Monica

        • 1. Re: Error on pages TogglePanelManager is not defined
          sivaprasad9394

          Please check the below code for the simple togglePanel example.....

          check for the switchType also

           

          <h:panelGrid columns="3" width="100%">

                      <rich:simpleTogglePanel switchType="server" label="Server Switch Type" height="90px">                   

          Panel1

                      </rich:simpleTogglePanel>

                      <rich:simpleTogglePanel switchType="ajax" label="Ajax Switch Type" height="90px">                   

          Panel2

                      </rich:simpleTogglePanel>

                      <rich:simpleTogglePanel switchType="client" label="Client Switch Type" height="90px">                   

          Panel3

                      </rich:simpleTogglePanel>

                  </h:panelGrid>      

          • 2. Re: Error on pages TogglePanelManager is not defined
            monical

            Hallo

             

            Thank you very much for your reply but I tried server and ajax and then it complains about a parent, also we are using the rich:togglePanel not the rich:simpleTogglePanel, below is the code that currently give's the TogglePanelManger error, if there is perhaps something inthere that doesn't look right.

             

            <rich:togglePanel initialState="panelA" switchType="client" stateOrder="panelA">

                 <f:facet name="panelA">

                       <f:subview id="aView">

                           <a4j:form id="left_menu_form">

                                <ui:include src="/mainmenu_dyn.xhtml"/>

                           </a4j:form>

                           <a4j:form id="left_quickstart_form">

                                <ui:include src="/quickstart.xhtml"/>

                           </a4j:form>

                      </f:subview>

                 </f:facet>

            </rich:togglePanel>

            • 3. Re: Error on pages TogglePanelManager is not defined
              monical

              Hallo

               

              Think I found the problem when I added in the toggleControle the error went away, so changed my code to below

              <rich:togglePanel id="panel" initialState="panelA" switchType="client" stateOrder="panelA">

                 <f:facet name="panelA">

                    <f:subview id="aView">

                       <a4j:form id="left_menu_form">

                          <ui:include src="/mainmenu_dyn.xhtml"/>

                       </a4j:form>

                       <a4j:form id="left_quickstart_form">

                          <ui:include src="/quickstart.xhtml"/>

                       </a4j:form>

                    </f:subview>

                 </f:facet>

              </rich:togglePanel>

              <rich:toggleControl for="panel" value="" />