You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Britske <gb...@gmail.com> on 2008/04/14 18:57:50 UTC

T5: possible to call 'template expansion service' to flexibily render blocks which are not known a priori

Based on a simplified rules engine I'm determining what to render to screen. 
For flexibility a want to be able to pull html-snippets from a database
(based on these rules) which can contain template expansions. (i.e:
<div>${country.name}</div>). 

I want to know if it is possible (in for instance the setupRender or
beginRender phase of the containing page) to expand the fetched html-snippet
to include values based on the current instance for country in this
instance. What service should I call for this (if possible) and what are
possible caveats easing this? 

With this I want to tackle the general problem of a-priori not knowing: 
- what kind of blocks / modules a page needs to load. 
- how many blocks are loaded. 

in other words, I can't use delegate to delegate rendering to a particular
block, because this limits me in what (html)context the block is rendered
(the place where the delegate is contained in the template) and it limits me
to render only 1 block per delegate, where every possible delegate must be
defined at design time (and so must be known apriori). 

I have seen other posts concerning the same general problem, but haven't
found a definitive solution in these posts. If anyone has a better solution
for the general problem outline above, of course I'm interested as well.

Thanks,
Britske
-- 
View this message in context: http://www.nabble.com/T5%3A-possible-to-call-%27template-expansion-service%27-to-flexibily-render-blocks-which-are-not-known-a-priori-tp16679028p16679028.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org