Re: WebWork + SiteMesh using FreeMarker - available variables in decorators

Jason Chambers <[email protected]>
Newsgroups gmane.comp.web.sitemesh.general
Message-ID <[email protected]>
If you are wanting to do localized decoration, there is a 
DecoratorMapper that does this for you.

http://jira.opensymphony.com/browse/SIM-166

As of right now, it's not part of the SiteMesh distribution so you will 
have to download the attached code and stir it into your SiteMesh, build 
and serve.
.
Jason Carreira wrote:

>  request.getLocale() ?
>
> That's where WebWork's ServeltDispatcher gets it....
>
> You can also set it in the Session and let users set their Locale for 
> the rest of their session... Check out the I18nInterceptor. It's 
> especially good for testing :-)
>
> Jason
>
> On Apr 6, 2005 1:00 PM, *Vítor Souza* <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Hi,
>
>     As stated in the subject, I'm developing a web application with
>     WebWork (2.1.7) and SiteMesh (2.2.1), using FreeMarker (2.3.2) for
>     the views in WebWork and decorators in SiteMesh.
>
>     I want to fetch the current Locale to use in my web pages and
>     decorators. For the web pages, I just do <#assign locale =
>     Locale.getDefault() /> and it works fine. But that doesn't work in
>     the SiteMesh decorators. I'm guessing that WebWork is responsible
>     for the sucess of that directive, since when SiteMesh runs WebWork
>     is no more in control of the request.
>
>     Does anyone have a suggestion on to how to extract the locale when
>     inside a SiteMesh decorator?
>
>     Thanks,
>     Vítor Souza
>
>     ---------------------------------------------------------------------
>     Posted via Jive Forums
>     http://forums.opensymphony.com/thread.jspa?threadID=1355&messageID=4184#4184
>     <http://forums.opensymphony.com/thread.jspa?threadID=1355&messageID=4184#4184>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: [email protected]
>     <mailto:[email protected]>
>     For additional commands, e-mail: [email protected]
>     <mailto:[email protected]>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.