tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Regalut <rega...@hotmail.com>
Subject I18n In title with dynamic parameters
Date Mon, 26 May 2008 11:48:39 GMT

Hi:

I am doing an web application with struts 2 and tiles 2, and want that the
title, of every page, is internationalized and furthermore that will contain
dynamic parameters.

example: "Information of Nokia N95", being Nokia N95 the title of a product,
that is to say a dynamic information.

tiles.xml
<definition name="common.layout" template="/common/layout.jsp">
	<put-attribute name="tituloKey" value="" />
	<put-attribute name="tituloKeyParam1" value=""/>
...
</definition>
<definition name="pages.product" extends="common.layout">
	<put-attribute name="tituloKey" value="title.product" />
	<put-attribute name="tituloKeyParam1" value="%{product.title}" />
	<put-attribute name="contenido" value="/pages/product.jsp" />
</definition>

layout.jsp;
<tiles:importAttribute name="tituloKey"/>
<tiles:importAttribute name="tituloKeyParam1"/>
<title>
	<s:text name="%{#attr['tituloKey']}">
		<s:param value="%{#attr['tituloKeyParam1']}"/>
	</s:text>
</title>

ApplicationResources.properties:
title.product = Information of {0}

The problem is that if an action takes to me to pages.product the title
shows me " Information of %{product.title} "

How I can solve this?

Thanks.
-- 
View this message in context: http://www.nabble.com/I18n-In-title-with-dynamic-parameters-tp17470472p17470472.html
Sent from the tiles users mailing list archive at Nabble.com.


Mime
View raw message