1 Reply Latest reply on Jun 7, 2013 7:02 PM by Brian Leathem

    Problem while using rich:componentControl and rich:collabsiblePanel

    Patrick Köhler Newbie

      Hello Guys,

       

      my problem deals with the rich:componentControl - Tag.

       

      If I use the <rich:component> and the  <rich:collabsiblePanel> within the same document I am not able to open or close the <rich:collabsiblePanel>.

      The same problem occours with <rich:component> and <rich:tab>.

       

      Attached you can find a short example:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:ui="http://java.sun.com/jsf/facelets">
      <h:head><title>sdfdfs</title></h:head>
          <h:body>
              <h:form>
                  <h:commandButton value="Call the popup" >
                      <rich:componentControl target="popup" operation="show" event="click" />
                  </h:commandButton>
      
                  <rich:popupPanel id="popup" modal="true"
                      resizeable="true" onmaskclick="#{rich:component('popup')}.hide()">
                      <f:facet name="header">
                          <h:outputText value="Open PopUp" />
                      </f:facet>
                      <f:facet name="controls">
                          <h:outputLink value="#"
                              onclick="#{rich:component('popup')}.hide(); return false;">
                                  X
                          </h:outputLink>
                      </f:facet>
                      Test
                  </rich:popupPanel>
                  <rich:collapsiblePanel switchType="ajax" header="Panel can not be closed because of switchType=ajax" />
              </h:form>
          </h:body>
      </html>
      

       

      Below my debug output after clicking the <rich:collabsiblePanel>:

      debug-output.jpg

       

      If I use switchType=client for <rich:collabsiblePanel> everything works fine.

       

      Did I something wrong?

      I am using RichFaces 4.2.3 and MyFaces  2.1.12.

       

      Best regards

       

      Patrick