tiles-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Pluggable attribute evaluation (WAS: Adding new attribute type....)
Date Mon, 18 Jun 2007 17:38:35 GMT
2007/6/18, Pawel Kozlowski <pkozlowski@amadeus.com>:
> What I want to do is a new attribute type of a "WebWork" (or Struts2)
> type. This is basically the same as putting in a Tile attribute a JSP that
> is executing a WebWork action (with the provided action tag)

It seems pretty interesting, but please follow this discussion in
Tiles Developers mailing list.
In fact, I was thinking about a pluggable "attribute renderer" that
takes an attribute as an input and renders it. The particular use case
was for evaluating objects with EL.
Probably a "chain" implementation (one element of the chain evaluates
Struts 2 actions, the other EL expressions, the last is the default
evaluator i.e. the one with the "switch") could be useful and,
possibly, allow configuration of this chain by plugins (e.g. Struts 2
Note that, anyway, such a major change would be done only in Tiles 2.1.

> A Tile:
> <definition name="app.page.home" extends="core.page" >
>         <put-attribute name="title" value="Home"/>
>         <put-attribute name="body" value="..."/>
>         <put-attribute name="dynamicFooter" value="DynamicFooter.jsp"/>
> </definition>
> the DynamicFooter.jsp:
> <ww:action name=" DynamicFooter" executeResult="true" />
> By writing such an attribute I want to avoid creation of those small,
> intermediate "action JSPs". At the same time it would allow me to build
> pages from "true" components, having their own controllers. For me this is
> a legitimate use case - what do you think? Is there a better way to
> achieve this?

Just curious, what does prevent you from using the
"/DynamicFooter.action" syntax?

> Of course changing BasicTilesContainer would be possible (the code is
> really clean and readable) but hey, I would like to benefit from future
> releases of Tiles2 and not to start my own branch ;-)

Using your own Container does not mean branching :-)

> PS Sorry for not linking this post with a thread - from now on I'll be a
> good citizen - I've subscribed to the list :-)

And now you have to subscribe to another one :-)


View raw message