struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: [S2][Tiles] Ressource access from tiles.xml ?
Date Thu, 07 Jun 2007 12:52:02 GMT
2007/6/7, Petit Pas De Lune <petitpasdelune@gmail.com>:
> Hello.
> Is-it possible to internationalize some string definitions in
> Tiles.xmlconfiguration file
> with resources.properties ?
>
> If yes, how can I do it ?

Not directly, but it's not impossible.
First of all, put in string attributes the keys:

<put-attribute name="my.message" value="this.is.a.key" />

In JSP template page, use:

<tiles:importAttribute name="my.message" />

This way, the key is stored as a page-scoped bean with the same name.
At this point, you can use this bean as a key for the message to
display.

HTH
Antonio

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


Mime
View raw message