struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <cedric.dumou...@lifl.fr>
Subject Re: Tiles Definitions - how to I 18n them?
Date Wed, 06 Feb 2002 10:12:18 GMT

  Hi,

  If the definition is defined in an xml file, there is no way to set a value from
a property file.
  But, you can do another approach : in your definition, use the property key
value, and in your template/layout, read the value from the property file using the
property key.

   Cedric

Example :
  <definition name="index" path="/layouts/courseBuilder.jsp">
          <put name="title.key"  value="title.courseBuilder" />
          <put name="header" value="/common/header.jsp" />
          <put name="menu"   value="doc.menu.main" />
          <put name="footer" value="/common/footer.jsp" />
          <put name="body"   value="doc.portal.body" />
  </definition>

.... in courseBuilder.jsp :
<tiles:importAttribute name="title.key"/>
<bean:message name="title.key"/>


Matt Raible wrote:

> Hopefully this is easy...
>
> In the following tiles definition:
>
>   <definition name="index" path="/layouts/courseBuilder.jsp">
>           <put name="title"  value="Course Builder" />
>           <put name="header" value="/common/header.jsp" />
>           <put name="menu"   value="doc.menu.main" />
>           <put name="footer" value="/common/footer.jsp" />
>           <put name="body"   value="doc.portal.body" />
>   </definition>
>
> How do I make the "title" attribute come from my ApplicationResource.properties
> file?
>
> Thanks - first time getting into the nitty gritty of tiles, so sorry for the
> ignorance.
>
> Matt
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


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


Mime
View raw message