Re: Change decorator in the request

Scott Farquhar <[email protected]> Thu, 11 Mar 2010 04:14:13 +1100
Newsgroups gmane.comp.web.sitemesh.general
Message-ID <[email protected]>
You can set the decorator by setting the proper request attribute.
However, easiest would be to just use the PageDecoratorMapper, where
you can set a meta attribute in the HTML:

  http://onjava.com/pub/a/onjava/2004/09/22/sitemesh.html?page=3D3

Cheers,
Scott

On 11 March 2010 03:10, Jonathan Barbero <[email protected]> wrote=
:
> Hi,
>
> =A0I'm trying to change the decorator selection in the request, before
> sitemesh renders the page.
>
> For example, the request has a parameter that selects an specific decorat=
or,
> in the servlet I want to override that election with other decorator.
> I could use the SessionDecoratorMapper before the PageDecoratorMapper so =
I
> could set in the session the decorator that I want that Sitemesh uses,
> ignoring the parameter. The problem with this is that I don't want that
> another request uses the decorator that I set in the session. The best
> solution is to set an attribute in the request that override the paramete=
r
> selection, but I didn't find any DecoratorMapper that extracts the decora=
tor
> to use from a request's attribute.
>
> =A0Any tip?
>
> =A0Thanks in advance,
> =A0 Jonathan.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]