2 Replies Latest reply on Oct 6, 2009 5:22 AM by lfryc

    Trigger events on inactive tab

    lfryc

      Hi,

      I recognized than if you want trigger some event on TabPanel, it is possible to do it only on active tab - e.g. I have dynamic list of panels and I want to implement button which causes removing one item from list (closing one tab):

      <rich:tabPanel switchType="ajax" selectedTab="#{chat.selectedTab}">
       <c:forEach items="#{chat.talksArray}" var="talk" varStatus="status">
       <rich:tab id="#{talk.tabName}">
       <f:facet name="label">
       ...
       <a4j:commandLink value="Close" action="#{chat.closeTalk}" reRender="formChat">
       <a4j:actionparam value="#{talk.buddy.rosterEntry.user}"
       assignTo="#{chat.selectedBuddy}" />
       </a4j:commandLink>
       ...
       </f:facet>
       </rich:tab>
       </c:forEach>
      </rich:tabPanel>
      


      If I click on the "Close" link on the inactive tab, the tab is first switched to active state. Now I can to click the tab secondly to activate the link action.


      Same behaviour takes place when triggering custom action on the tab, e.g. onmouseover, for the outputPanel nested in the tab.


      Can I make the link to trigger clicking in the inactive tab?