5 Replies Latest reply on Nov 25, 2008 9:26 AM by Ilya Shaikovsky

    tabs with includes

    Pieter Porre Newbie

      Hey

      I managed to add new tabs and remove them but with a fixed number of predefined tabs. The problem I'm having is that when I create a new tab I need to rerender the TabPanel, but I only want to rerender the newly created tab.

      I need this because it is possible to have the same page in different tabs.

      Is there any way to rerender the tabpanel without rerendering its allready filled in children?

      This is what my page with the tabs looks like.

      <rich:tabPanel id="tabs" switchType="client" >
       <rich:tab label="Overview" binding="#{navigationBean.tab1}">
       <a4j:include id="include1" viewId="#{navigationBean.path1}" />
       </rich:tab>
       <rich:tab label=" " style="display:none" name="tab2" ontabenter="updateActiveTab('tab2')" binding="#{navigationBean.tab2}" >
       <h:panelGroup style="float:right; margin-top:-5px">
       <h:form>
       <a4j:commandLink reRender="tabs" action="#{navigationBean.removeTab}">
       <h:graphicImage value="/images/closeicon.gif" />
       <a4j:actionparam name="removedTab" value="tab2" assignTo="#{navigationBean.removedTab}" />
       </a4j:commandLink>
       </h:form>
       </h:panelGroup>
       <a4j:include id="tab2" viewId="#{navigationBean.path2}" />
       </rich:tab>
       <rich:tab label=" " style="display:none" name="tab3" ontabenter="updateActiveTab('tab3')" binding="#{navigationBean.tab3}">
       <h:panelGroup style="float:right; margin-top:-5px">
       <h:form>
       <a4j:commandLink reRender="tabs" action="#{navigationBean.removeTab}">
       <h:graphicImage value="/images/closeicon.gif" />
       <a4j:actionparam name="removedTab" value="tab3" assignTo="#{navigationBean.removedTab}" />
       </a4j:commandLink>
       </h:form>
       </h:panelGroup>
       <a4j:include id="tab3" viewId="#{navigationBean.path3}" />
       </rich:tab>
      </rich:tabPanel>