struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Reddin <>
Subject Re: Too many moving parts in Tiles
Date Thu, 26 Oct 2006 03:03:08 GMT

On Oct 25, 2006, at 6:01 PM, Chris Pratt wrote:

> Greg, to answer your question, "how do I think this should work?"  One
> improvement I can think of would be to allow this type of  
> construct.  In the
> tiles-defs.xml, specify a definition like:


> Then allow inserting, referencing and populating in one fell swoop,
> something similar to:
> <%@ taglib prefix="tiles" uri=" 
> el"%>
> <tiles:insert definition="site.layout">
>  <put name="header" value="/tiles/index-header.jsp"/>
>  <put name="body" value="/tiles/index-body.jsp"/>
>  <put name="footer" value="/tiles/index-footer.jsp"/>
> </tiles:insert>
> which right now ignores all the puts in the body of the insert and  
> just
> inserts the definition.  This would allow you to separate the reusable
> definitions from the single use pages.

Thanks, that helps a lot.   I think there's a lot of people out there  
who would like it to work this way.  We've had some discussions on  
the dev list about restructuring the tags in Tiles 2.  The problem is  
that the <tiles:insert> tag means multiple things.  In some cases it  
means "insert this definition here" (like your example above).   In  
other cases it assumes you are "inside" a definition template and it  
means "insert the specified attribute here".  I can see what you mean  
about trying to insert a definition on the fly instead of defining it  
in the XML file.  Have you tried using the <tiles:definition> tag?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message