tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mck <m...@semb.wever.org>
Subject Re: howto delegate to other definitions ?
Date Tue, 16 Feb 2010 08:21:20 GMT
> Associate a preparer to vertical.motor that accesses to the stack of 
> AttributeContext's: 
> 
>  ArrayStack<AttributeContext> contextStack = 
>             (ArrayStack<AttributeContext>) tilesContext 
>                 .getRequestScope().get(ATTRIBUTE_CONTEXT_STACK); 
> 
> Where ATTRIBUTE_CONTEXT_STACK has this value: 
> "org.apache.tiles.AttributeContext.STACK" 
> 
> Get the element under the top of the stack, that it is the attribute 
> context of the parent definition (probably, it might be 2 under the 
> top, not sure) and transfer the attribute that is under the current 
> AttributeContext (parameter in the preparer).
> ...
> Does it sound better? :-D

I'm not sure yet, since there's some hacking both ways (overriding
getDefinitions() is cleaner), but it definitely opens up my
understanding of what can be possible. thank you. The most important
thing here is to find the solution which scales clean and neat the best
so i'll experiment some more with both ideas.

~mck

Mime
View raw message