You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Holtzhouser <da...@yahoo.com> on 2003/04/16 20:51:35 UTC

Tiles Question

I was asked the following question by a colleague, but
I'm not sure I know the answer:

1st version:
<%@ taglib uri="/WEB-INF/tiles.tld" previx="tiles" %>

<html>
<head>
	<title><tiles:getAsString name="title" /></title>	
</head>
<body>
	<table width="720">
    		<tr>
			<td><tiles:insert attribute="page_header"
flush="true" /></td>		
		</tr>
		<tr>
			<td><tiles:insert attribute="body" flush="true"
/></td>
		</tr>
		<tr>
			<td><tiles:insert attribute="page_footer"
flush="true" /></td>
		</tr>				
	</table>
</body>
</html>

****************************************************

2nd version:
<%@ taglib uri="/WEB-INF/tiles.tld" previx="tiles" %>

<html>
<head>
	<title><tiles:getAsString name="title" /></title>	
</head>
<body>
	<table width="720">
    		<tr>
			<td><tiles:get name="page_header" /></td>		
		</tr>
		<tr>
			<td><tiles:get name="body" /></td>
		</tr>
		<tr>
			<td><tiles:get name="page_footer" /></td>
		</tr>				
	</table>
</body>
</html>

What is the difference between using the <tiles:get />
versus the <tiles:insert /> tag?

Thanks


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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


Re: Tiles Question

Posted by Cedric Dumoulin <ce...@apache.org>.
  <tiles:get ..> is for backward compatibility with the template lib 
from David Geary.
  <tiles:insert ...> is the tiles prefered way.
There is one major difference: <get> do nothing if there is an error 
while <insert> report the error. You can specifiy <insert ... 
ignore="true"> to instruct insert to ignore errors.

    Cedric

David Holtzhouser wrote:

>I was asked the following question by a colleague, but
>I'm not sure I know the answer:
>
>1st version:
><%@ taglib uri="/WEB-INF/tiles.tld" previx="tiles" %>
>
><html>
><head>
>	<title><tiles:getAsString name="title" /></title>	
></head>
><body>
>	<table width="720">
>    		<tr>
>			<td><tiles:insert attribute="page_header"
>flush="true" /></td>		
>		</tr>
>		<tr>
>			<td><tiles:insert attribute="body" flush="true"
>/></td>
>		</tr>
>		<tr>
>			<td><tiles:insert attribute="page_footer"
>flush="true" /></td>
>		</tr>				
>	</table>
></body>
></html>
>
>****************************************************
>
>2nd version:
><%@ taglib uri="/WEB-INF/tiles.tld" previx="tiles" %>
>
><html>
><head>
>	<title><tiles:getAsString name="title" /></title>	
></head>
><body>
>	<table width="720">
>    		<tr>
>			<td><tiles:get name="page_header" /></td>		
>		</tr>
>		<tr>
>			<td><tiles:get name="body" /></td>
>		</tr>
>		<tr>
>			<td><tiles:get name="page_footer" /></td>
>		</tr>				
>	</table>
></body>
></html>
>
>What is the difference between using the <tiles:get />
>versus the <tiles:insert /> tag?
>
>Thanks
>
>
>__________________________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo
>http://search.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>  
>


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