0 Replies Latest reply on Apr 25, 2007 4:05 AM by Nina Batdashova

    togglePanel in Facelets custom components.

    Nina Batdashova Newbie

      Hi!
      I've a such problem:
      I've created some custom tag, and trying to pass there content. and I'd like to have functionality, to collaps (hide) my content, by clicking on some area(link, button, no matter). Everything is ok, when i use my custom component once time on page, but when i try to use it two or more times, after clicking on corresponding area only one(fist) of two( or more) contens became collapsed.

      my code:

      my template.xhtml
      <html ....... namespace declaration>
      <ui:composition>
      <rich:toggleControl for="panel"></rich:toggleControl>

      <rich:togglePanel id="panel" stateOrder="content,epmty" switchType="ajax" initialState="content">
      <f:facet name="content">
      <ui:insert/>
      </f:facet>
      <f:facet name="epmty">
      <h:outputText/>
      </f:facet>
      </rich:togglePanel>
      </ui:composition>

      then i register mu custom tag in taglib.
      Use it in my "home page" several times:

      <myTag:homePanel>
      <my content, that collaps fine>
      </myTag:homePanel>

      <myTag:homePanel>
      <my content, that doesn't collaps fine>
      </myTag:homePanel>

      <myTag:homePanel>
      <my content, that doesn't collaps fine>
      </myTag:homePanel>

      could you advise me smth?
      Thanks