13 Replies Latest reply on Apr 17, 2007 5:16 PM by nbelaevski

    simple question about rich:tabPanel with a4j:include

    grimholtz

      Hi,

      I have a <rich:tabPanel/> and <rich:tab/> that display just fine, but the content inside the tab, i.e., the <a4j:include/> content, doesn't display anything at all. It displays completely empty. Note I'm using switchtype="ajax". Is the default selected tab when switchtype="ajax" supposed to automatically load when the page loads, or must the default tab be switchtype="client"?

      http://img467.imageshack.us/img467/130/s1mk4.png

      Here's my code:

      /*** container.jsp: container around tabs.jsp to display rounded background div ***/
      
      <f:view><html><head/><body>
      <% /* TODO: make nice rounded background div */ %>
      <f:subview id="tabs">
       <jsp:include page="tabs.jsp"/>
      </f:subview>
      </body></html></f:view>
      
      
      /*** tabs.jsp ***/
      
      <f:subview id="tabs">
      <h:form id="hdr">
       <rich:tabPanel switchType="ajax">
       <rich:tab label="Home" reRender="tab-content"
       action="home"/>
       <rich:tab label="Shopping cart" reRender="tab-content"
       actionListener="#{cart.load}"
       action="#{cart.toCart}"/>
       </rich:tabPanel>
       <a4j:include id="tab-content" viewId="/home.jsp"/>
      </h:form>
      </f:subview>
      
      
      /*** home.jsp ***/
      
      <f:subview id="homeView">
      <h:form id="homeForm">
      <f:verbatim><h3>Welcome Home!</h3></f:verbatim>
      </h:form>
      </f:subview>


      Any help would be greatly appreciated.

      Sincerely,
      Eric