10 Replies Latest reply on Aug 17, 2011 9:16 AM by Bharath Navali

    Rich tabPanel ignoring component id's in the included page

    Nikhil Patil Newbie

      Hi! I'm using richfaces 4 CR1 + Mojarra 2.0.4.

      I'm generating tabs dynamically with switchType as "ajax".

       <rich:tabPanel id="tabs" switchType="ajax" style="height:100%" activeItem="#{us.currentTabId}" itemChangeListener="#{us.changeTabName}">
                                       <c:forEach items="#{us.tabs}" var="tab" varStatus="it">
                                              <rich:tab name="#{tab.id}"
                                                        <f:facet name="header">
                                                                                 <h:outputText value="#{tab.header}" />
                                                                            <h:panelGroup style="float: right;margin-top: -5px;">
                                                                                      <a4j:commandLink render="tabs" action="#{us.closeTab}" rendered="#{tab.isClosable}">
                                                                                                <h:graphicImage library="images" name="btn_cancel.png" style="cursor:pointer;border:0;"/>
                                                                                                <f:setPropertyActionListener value="#{it.index}" target="#{us.index}"/>
                                                        <ui:include src="#{tab.includePath}" />



      The problem I'm facing is the pages incuded with #{tab.includePath}, only the first tab's page gets rendered with correct id's (with their parent id's prefixed to it as per the standard rendering technique. However, all the other tabs get rendered with random id's (all pages's componenets do have id's mentioned in the xhtml markup). This holds true even for switchType="server" or "client".

      If I change the order in the #{us.tabs} list and make some other tab rendered first, it behaves the same way - that tabs id's are rendered correctly but all others are not.

      Am I missing something? Or using something incorrectly? Any help is appreciated!


      Message was edited by: Nikhil Patil. Edited the question text. It was misleading.