tiles-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pawel Kozlowski <pkozlow...@amadeus.com>
Subject Re: Pluggable attribute evaluation (WAS: Adding new attribute type....)
Date Thu, 21 Jun 2007 11:02:26 GMT
Hi Antonio and All on this list, 

Once again, thnx for your response?. 

"Antonio Petrelli" <antonio.petrelli@gmail.com> wrote on 18/06/2007 
19:38:35:

> 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
> plugin).

EL support would be definitely a big plus! 

As for design: pluggable renderers sound like a good idea. Are you 
thinking of registering those renderers in a container? And then, while 
rendering an attribute, looking for a proper renderer? This should work 
fine, I guess. I only wonder what we should do with the enum for an 
attribute type. Drop it altogether? 

> Note that, anyway, such a major change would be done only in Tiles 2.1.

I'm not suprised to hear this ;-)
 
 
> Just curious, what does prevent you from using the
> "/DynamicFooter.action" syntax?

3 reasons for this: 
- I need to do some custom processing before dispatching to an action 
(pass some parameters etc. - maybe with EL support it would be no longer 
necessary);
- I also need to add other attr types,
- I couldn't make "/DynamicFooter.action" syntax work with Struts 2.0.8 + 
Tiles 2.0.3. I've spend some time debugging the code and it looks like 
this syntax would be equivalent to doing <jsp:include flush="true" 
page="/DynamicFooter.action" / in a JSP. In Tomcat it gives me "The 
requested resource (/[context name]/DynamicFooter.action) is not available
" error.

So, I would be more then happy to discuss a design when we are able to add 
a new attribute type without too much pain?

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