struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murray.Bo...@aeso.ca
Subject Nested tab layouts possible?
Date Thu, 17 Jul 2003 20:19:25 GMT

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


Mime
View raw message