My layout file (layout.jsp) has the following block

<tiles:insert attribute="header" flush="true"/>
<tiles:insert attribute="menubar"  flush="true"/>
<tiles:insert attribute="body"  flush="true"/>

That is I want first the header tile to be layed out, then the menu tile and finally the body tile.

The definition for the page in the tiles-def.xml file is

<definition name=".customer.page" path="/WEB-INF/layout.jsp" >
        <put name="header"  value="/WEB-INF/header.jsp" />
        <put name="menu"  value=".menu" />
        <put name="body"   value="/WEB-INF/customer.jsp" />
</definition>

<definition name=".menu" path="" controllerUrl="/admin/menu.do">
</definition>

<definition name=".menubar1" path="/WEB-INF/menu.jsp">
   <putList name="menu" >
      <item value="Search"
        link="/admin/search.do"
        classtype="org.apache.struts.tiles.beans.SimpleMenuItem"
        tooltip="Search for customers" />
</definition>

Note that the menu uses an action to determine whether the current logged on user should have access to this item. In fact I have several menubars and the action forwards tot he relevant one for the user.

the struts-config mapping is

<action path="/admin/menu" type="com.CheckRoleAction">
        <forward name="success" path=".menubar1"/>
        <forward name="failure" path=".error"/>
</action>

Now all this works perfectly EXCEPT that the order of the tiles is wrong. The menu tile is displayed before the header tile. If i change my layout to

<tiles:insert attribute="header" flush="true"/>
<tiles:insert attribute="body"  flush="true"/>
<tiles:insert attribute="menubar"  flush="true"/>

then everything works Ok. This is only a problem when using a tiles controller and I am sure it was working correctly in struts 1.0 ( in fact i am certain it was ok even in the 1.1 betas)

I was going to raise this in the bug database if everything here is OK

thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to