You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lee Zhao <Le...@netro-corp.com> on 2002/12/10 22:35:22 UTC
Tiles tabsLayout stopped working with struts 1.1?
Hi,
The Tiles tabsLayout no longer works after I migrated my code to struts 1.1 from struts 1.0 and the separate Tiles download. I also tried the examples in the tiles-documentation war that comes as part of the struts 1.1-b2 and was getting exactly the same problem. The error I am getting is [ServletException in:/common/tabsLayout.jsp] null'. See below for more info on this problem. Does someone know a solution to this problem?
Thanks
Lee
//////////////////////////////////////
My jsp:
<tiles:insert definition="classic" flush="true" >
<tiles:put name="header" value="<div class=pagehdr>Customer</div>" />
<tiles:put name="body" value="customer.showCustomerInfo" />
</tiles:insert>
The customer.showCustomerInfo is a tile definition in my tiles-def.xml:
<!-- tabs page -->
<definition name="customer.showCustomerInfo" path="/common/tabsLayout.jsp">
<put name="selectedIndex" value="0" />
<put name="parameterName" value="selected" />
<put name="header" value="Customer" />
<putList name="tabList" >
<item value="General"
link="/customer/generalCustomerInfo.jsp"
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
<item value="Services"
link="/customer/customerInstalledServices.jsp"
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
</putList>
</definition>
The error is caused by the following line in the tabsLayout.jsp because the tabList is null:
if( selectedIndex < 0 || selectedIndex >= tabList.size() ) selectedIndex = 0;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>