8 Replies Latest reply on May 4, 2007 7:18 PM by Vladimir Ralev

    bug in togglePanel/toggleControl

    Vladimir Ralev Newbie

      This works:

      <h:form>
       <rich:togglePanel id="tp" stateOrder="one,two" switchType="ajax">
       <f:facet name="one">One</f:facet>
       <f:facet name="two">Two</f:facet>
       </rich:togglePanel>
       <rich:toggleControl for="tp" value="switch:"></rich:toggleControl>
      </h:form>
      


      Opps code (SS):
      <h:form>
       <rich:togglePanel id="tp" stateOrder="one,two" switchType="client">
       <f:facet name="one">One</f:facet>
       <f:facet name="two">Two</f:facet>
       </rich:togglePanel>
       <rich:toggleControl for="tp" value="switch:"></rich:toggleControl>
      </h:form>
      


      This doesn't:
      <h:form>
       <rich:togglePanel id="tp" stateOrder="one,two" switchType="ajax">
       <f:facet name="one">One</f:facet>
       <f:facet name="two">Two</f:facet>
       </rich:togglePanel>
       <rich:toggleControl for="tp" value="switch:"></rich:toggleControl>
      </h:form>
      


      Firefox says the error is:
      XML error. Expected: </input>.
      Row 6, column 247:<!-- vcp:body/--><div id="j_id2:tp"><div id="j_id2:tp_one" style="display: inherit">One</div><div id="j_id2:tp_two" style="display: none">Two</div><div style="display: none;"><input type="hidden" id="j_id2:tp_input" name="j_id2:tp" value="one"></div><script type="text/javascript">TogglePanelManager.add(new TogglePanel("j_id2:tp", $A(["one", "two"]), "one"));</script></div><a class="dr-tglctrl rich-tglctrl " href="#" id="j_id2:j_id5" onclick="TogglePanelManager.toggleOnClient('j_id2:tp',null);; return false;">switch:</a><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAAJVUPXAbRRR+ukSWYmcSxwFDiswQ4oIM8coJcSbEBch2FN9wNhrbMBAKe31aSaesdo+9Pd2lyYQmFDQUQOUZUlCGloKCn6GgAoaChoqhBipm+Gng7envZJ/42WLn3e5779733rffw58hHyo4/ZrToh1KOBUN8uJei7l66e2vX3l/OrjALYDYB4CjgYJnXNkmQShInbosINT3uedS7UlBtjTVbJ0K2mDKbvt8blsxtiFr7Nf6x598uHDz0+MmT/QsmPWUVA1CWzS+0grqpK5om0VS3U6OSBm3lz0WbUqp4dhOp2fGwetwF6xoIclw3tQb9+rAqnwpmNCkqducrOFWkaoN+daOV7vcD7yKYTm4aH6tPLc5NnRbNhqcValgHCzt98OXknDyH8NXpNBK8m4Ji3FocphlZVjFoYU9PpVMItQepqNBc536+cL3n38xu/vtEbAqMMklrVWoq6Wy4ZhuKhY0Ja/F/nPPJykmoqJJZIrVcMlU29qTQUACRtukWr55Y+7AmSsV6/axirPDAs5mOVT6DssfOZ/FX+42LMjfgjOuFB2mgoQCduBI0dgMhfBEw4ETI3c1DTMJx0qGY6UtrdBpyYGTPuascxmtyFBopjScTrnZeIR8Qr/jfb8N5MqYXNMDH6TdWD8ks48r9tPkMgN4ZND85BksS8kZFV89oe59t//nLxbkbkG+Q3nIYj+XcOJRTKRhcm173dlZLm/ZKxpOlqhLS5oFmsSGEZhyejhPR7qUs7u/n9rdX/jjJwuO2lBs4oxdrNeBgmtaoO6MQVc0nyEiHHNf6FDlUaHHgP4LlwbrpS3ckK8Ao2h7nZ758cEHv73x5jVEa/fR9iEkfhthe4+p+w/fPTv1zg9v9bWhgA0dkDhvjMeSzR+ag+tcxguYTb0AY00dIrOl4fG0+HCmA7Je3nxhx17VULxyldJLl/dolle5WnXsG6uIt3TozkOlIqusTkOuK93DuTKq2p1teZuJtf1vVpfEew+60nXm0HQRzMyrk/fD2JCpKzam+gWzzSaodbd3faEyqmTIp+FcSjtL8XwURfN1vJwPFWfC8KHmH1z/qCH5jLMTA+vIv/Y3Z46fHnZy0UAqJpCuazRRCNOozo3KYEoyN5moMcUUFjwcfooM/gFizKYcTGMKKKcXdSTRnHC5h1Qd1A4ZGC8MrIn/i/EaMxinuhgTme4NcTGN9HwW0p66Z2JFCEHkabd53e+pRA/c6Nfo54E7v9vxntOT97D44VXW4Uj8sGF/A7+TzY/fBwAA" />
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
      


      I am using the snapshot versions from Seam, i think these are the latest. - ajax4jsf-1.1.1-SNAPSHOT.jar and richfaces-3.0.1-SNAPSHOT.jar

      BTW, Over the past week I've been trying to build richfaces on my own, but I always get some unresolved dependencies. Right now it's:
      [INFO] Using default encoding to copy filtered resources.
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.
      
      Missing:
      ----------
      1) org.richfaces:common:jar:3.0.1-SNAPSHOT
      
       Try downloading the file manually from:
       http://labs.jboss.com/portal/jbossrichfaces/downloads
      
       Then, install it using the command:
       mvn install:install-file -DgroupId=org.richfaces -DartifactId=common \
       -Dversion=3.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
      
       Path to dependency:
       1) org.richfaces:drag-drop:jar:3.0.1-SNAPSHOT
       2) org.richfaces:common:jar:3.0.1-SNAPSHOT