tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pooyan Farahani <poofa...@googlemail.com>
Subject Changing the Tiles Attribute Context at runtime
Date Mon, 14 Feb 2011 01:42:58 GMT
Hi there,

I have a FrontController in charge of dispatching requests to different
pages. I have integrated my web application with the tiles framework and it
works fine. However, recently I need to add an extra functionality to it,
which I need to be able to change the tiles Attributes at runtim. For this
purpose, I have created a filter which intercepts the incoming requests and
based on the URL, it places the right tile attribute's value into the
TilesContainer as follows:

TilesContainer container = TilesAccess.getContainer(
        AttributeContext attributeContext =

 attributeContext.putAttribute(containerTilesPartName, new

using container.render method will produce the page, however, I want to
avoid using the render since it conflicts with the FrontController which has
to dispatch the request to the right destination.

When I place the attribute within the filter before calling the
chainFilter.filter it doesn't reflect the new value for the designated
attribute, I suspect somewhere at the middle the attribute I am setting ,is

Filter ----> change the attribute --> FrontController ---> jsp page --> load
the template ---> display the page

I don't want to change it to the following by using container.render() ,
since I would loose the FrontController logics afterwards.

Filter -- > change the attribute --> container.render

Would be any way to  OVERRIDE the template attributes at runtime and let the
rendering happens in the ordinary way?

Many thanks

                                                  <#>              <#>
<#>       <#>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message