tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Kiesel <jeffrey.kie...@netideasinc.com>
Subject What are the downsides to using the body wrap technique?
Date Mon, 07 Dec 2009 15:48:20 GMT
Hello,

I'm a web designer working on a software team.   I'm evaluating Tiles  
as a solution for us to implement UI templates for our app.  I read a  
bit about a body wrap technique, that enables me to do this:

<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<tiles:insertDefinition name="myapp.homepage" flush="true">
	<tiles:putAttribute name="body" type="string">
		
		<!-- begin developer work area  -->
		<div id="section">
			<h2>Section Title</h2>
			<p>descriptive text here</p>
		</div>
		<!-- end developer work area  -->
		
	</tiles:putAttribute>
</tiles:insertDefinition>


In the example above, instead of using the body attribute described in  
the template, I'm inserting my own as a string, right from this jsp.    
I like this because I don't have to define a new template for each  
each page that requires ONLY a different body area - I can use one  
template for all the page, and override the piece that needs to be  
different.  The body area does not need be reused elsewhere in the  
app.    I learned about this technique here:

http://www.developer.com/java/ent/article.php/10933_2192411_2/Struts-in-Action-Developing-Applications-with-Tiles.htm

Are there any downsides to this body wrap implementation?

Thanks,
~jeff
Mime
View raw message