You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "MacEachern, Tim" <Ti...@xwave.com> on 2003/05/02 18:57:58 UTC

Newbie requests help on tiles with definitions

I'm new to Struts/Tiles and have the following situation for which I
can't find the magic key.  Could anyone help me with whether this can be
done and, if so, how, and is it covered somewhere in the documentation?


I have set up some simple definitions using classicLayout and using a
componentList for my body as so...

	<definition name="mainLayout" path="/layout/classicLayout.jsp">
          <put name="title"  value="Default Title Text" />
          <put name="header" value="/en/common/header.jsp" />
          <put name="menu"   value="menu.main" />
	    <put name="body"   value="body.content" />
	</definition>

	<definition name="body.content" path="/layout/vboxLayout.jsp" >
	  <putList name="componentsList" >
	    <add value="/layout/contentHeader.jsp" />
	    <add value="/en/common/body.jsp" />
	    <add value="/layout/contentFooter.jsp" />
	  </putList>
	</definition>

	<definition name="english.layout" extends="mainLayout" >
		<put name="title" value="Specific Title" />
	</definition>

Now, what I want to do is replace the second element in the body.content
definition with my customized content.  If I have a file as so...

<tiles:insert definition="english.layout" flush="true">
	<tiles:put name="body.content" value="/en/body/index.jsp"/>
</tiles:insert>

It replaces nothing (I need name="body" to replace the whole list).  Can
I use 
   <put name="body.content.componentsList[1]" ...
Or something?  Or do I have to flow the contentHeader and contentFooter
parts down into classicLayout?

Thanks


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