tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Clough <rcclo...@kamakuraco.com>
Subject Re: i18n and variable tiles definitions
Date Thu, 20 Dec 2007 18:32:08 GMT
There may be a purely Tiles solution, but you could include a simple 
Title.jsp file with dynamic contents retrieved from some scope using a tag.


Peter Rumstle wrote:
> Hi everyone, 
>  
> I am running into what appears to be a limitation in tiles.  I hope someone has encountered
this problem before and knows of a workaround.  
>  
> I have a tiles based layout that accepts a "title" in the tiles definition.
>  
>     <definition name="recordDetail" extends=".template">
>         <put name="title" value="Record Detail"/>
>         <put name="body" value="/WEB-INF/jsp/tiles/recordDetail.jsp"/>
>     </definition>
>  
> My problem is that I need the title to be more dynamic.  It needs to do two things:
>  
> 1. Support different titles depending on the locale.
> 2. Accept a dynamic field identifying the record number that the page is showing.
>  
> For example, rather than say "Record Detail" like in my example it should say "Record
Detail: 38847829" and in other languages it should be translated using an existing ResourceBundle
(ex. "Detalle De registro: 38847829").
>  
> My problem lies in the fact that my .template tile includes the <title> tag, but
does not know which page it is rendering.  Only the "body" tile and the actual tiles definition
knows which page it is rendering for.  Other pages use the same .template tile but require
different dynamic fields in their title.
>  
> Has anyone got something like this working before?
>  
> Thanks!
> _________________________________________________________________
> Discover new ways to stay in touch with Windows Live! Visit the City @ Live today!
> http://getyourliveid.ca/?icid=LIVEIDENCA006
>   


Mime
View raw message