struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Pop <tom....@email.cz>
Subject struts2 and tiles
Date Fri, 30 Jan 2009 19:23:59 GMT
Hello,

please, can you show me on this example how to convert tiles from struts1 to struts2?

This example defines localized page title attribute passed to template in struts1:

<bean:define id="messages" name="<%= org.apache.struts.Globals.MESSAGES_KEY %>" type="org.apache.struts.util.MessageResources"/>
<bean:define id="locale" name="locale" type="java.util.Locale" scope="session" />
<%
	String docTitle = messages.getMessage(locale, "page.title");
%>
<tiles:insertDefinition name="layout-main">
	<tiles:putAttribute name="document-title"  	value="<%= docTitle %>" />
</tiles:insertDefinition>

Thank you.

Tom

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


Mime
View raw message