struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Beskrowni <ABeskro...@axeda.com>
Subject RE: Tiles Definitions - how to I 18n them?
Date Wed, 06 Feb 2002 15:20:37 GMT
another alternative is just to nest the resource retreival within the put
tag.  for instance:

<tiles:insert definition="index" flush="true">

  <tiles:put name="title.key" type="string" >
    <bean:message key="my.title.resource.key"/>
  </tiles:put>

  ...

</tiles:insert>

this keeps you from having to keep your title under the same resource key
everywhere since you specify in your jsp.

ab

> -----Original Message-----
> From: Cedric Dumoulin [mailto:cedric.dumoulin@lifl.fr]
> Sent: Wednesday, February 06, 2002 5:12 AM
> To: Struts Users Mailing List
> Subject: Re: Tiles Definitions - how to I 18n them?
> 
> 
> 
>   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>
> 

--
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