1 Reply Latest reply on Jul 21, 2015 10:39 AM by Michal Petrov

    rich:collapsiblePanel

    lordalucard7545 Newbie

      Hi,

      I currently work with the component rich:collapsiblePanel, I use it twice in my page as this:

      <rich:collapsiblePanel id="item1">...</rich:CollapsiblePanel>

       

      <rich:collapsiblePanel id="item2">...</rich:CollapsiblePanel>

       

      My need is to open only one component of rich:collapisblePanel, so when i click for example in the second item of richCollapsiblePanel the first one must be closed automaticaly.

       

      Thanks in advance

        • 1. Re: rich:collapsiblePanel
          Michal Petrov Master

          We have rich:accordion which is set up to work like that, otherwise you can use @onswitch and collapse the second panel when the first one expands, and vice versa:

           

          function collapse(event, id) {
              if (event.rf.data.isExpanded == 'true') {
                  RichFaces.component(id).collapse()
              }
          }
          
          <rich:collapsiblePanel id="panel1" onswitch="collapse(event, 'form:panel2'" …>