You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mu...@aeso.ca on 2003/07/17 22:19:25 UTC

Nested tab layouts possible?

Has anyone been able to get nested tabs working using tiles?

I have a tile that uses a tab layout. Within the first tab is another tile
that also has a tab layout. 

So within tab A, I want to see sub-tabs 1 and 2.

tiles-defs.xml:
  <definition name="tabslayout.default" path="/jsp/layouts/tabslayout.jsp">
    <put name="selectedIndex" value="0" />
    <put name="parameterName" value="selected" />
    <putList name="tabList">
	<item value="Tab A" link="/jsp/tabA.jsp" />
	<item value="Tab B" link="/jsp/tabB.jsp" />
    </putList>
  </definition>

  <definition name="tabslayout.nested" path="/jsp/layouts/tabslayout.jsp">
    <put name="selectedIndex" value="0" />
    <put name="parameterName" value="selected" />
    <putList name="tabList">
	<item value="Subtab 1" link="/jsp/tab1.jap" /> 
	<item value="Subtab 2" link="/jsp/tab2.jap" /> 
    </putList>
  </definition>

Main JSP:
<tiles:insert definition="tabslayout.default" flush="true" />

Tab A JSP:
<tiles:insert definition="tabslayout.nested" flush="true" />


At runtime, the indexing of tabs doesn't work properly. If I click on
sub-tab 2, it takes me to major tab B. There seems to be no way of selecting
a subtab index within a main tab index.

Anyone know if there a way to nest these things? Or a better approach?

Any help appreciated.







---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Nested tab layouts possible?

Posted by Cedric Dumoulin <ce...@apache.org>.
  You can nest tab layout, but you need to modify the tabsLayout.jsp to 
take into account the several tabs layout. Try  and adapt the 
nestedTabsLayout.jsp located in tiles-documentation.war under layouts.

  Hope this help,

      Cedric

Murray.Bodor@aeso.ca wrote:

>Has anyone been able to get nested tabs working using tiles?
>
>I have a tile that uses a tab layout. Within the first tab is another tile
>that also has a tab layout. 
>
>So within tab A, I want to see sub-tabs 1 and 2.
>
>tiles-defs.xml:
>  <definition name="tabslayout.default" path="/jsp/layouts/tabslayout.jsp">
>    <put name="selectedIndex" value="0" />
>    <put name="parameterName" value="selected" />
>    <putList name="tabList">
>	<item value="Tab A" link="/jsp/tabA.jsp" />
>	<item value="Tab B" link="/jsp/tabB.jsp" />
>    </putList>
>  </definition>
>
>  <definition name="tabslayout.nested" path="/jsp/layouts/tabslayout.jsp">
>    <put name="selectedIndex" value="0" />
>    <put name="parameterName" value="selected" />
>    <putList name="tabList">
>	<item value="Subtab 1" link="/jsp/tab1.jap" /> 
>	<item value="Subtab 2" link="/jsp/tab2.jap" /> 
>    </putList>
>  </definition>
>
>Main JSP:
><tiles:insert definition="tabslayout.default" flush="true" />
>
>Tab A JSP:
><tiles:insert definition="tabslayout.nested" flush="true" />
>
>
>At runtime, the indexing of tabs doesn't work properly. If I click on
>sub-tab 2, it takes me to major tab B. There seems to be no way of selecting
>a subtab index within a main tab index.
>
>Anyone know if there a way to nest these things? Or a better approach?
>
>Any help appreciated.
>
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org