cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Hunsberger <peter.hunsber...@gmail.com>
Subject Re: [RFC] "Cocoon Templates": Name and Tag Interface
Date Mon, 29 Nov 2004 23:16:18 GMT
On Mon, 29 Nov 2004 22:26:18 +0100, Leszek Gawron <lgawron@mobilebox.pl> wrote:
> Jonas Ekstedt wrote:
> 
> > On Mon, 2004-11-29 at 08:33 -0800, Ralph Goers wrote:
> > snip...
> >
> >>>Expressions
> >>>-----------
> >>>
> >>>This is somewhat OT in the current context but IMO expressions, (the
> >>>stuff inside ${}), should only have access to FOM and preferably just
> >>>read access. IMHO expressions should not have side effects.
> >>
> >>There should be a way to register objects for use by the template so that
> >>flow is not a requirement.  Of course, the template should also be able to
> >>access the request and response.
> >
> >
> > How about allowing a "context-populator" parameter to the template
> > generator. As an example, suppose we want to populate the context with a
> > query from a db.
> >
> > In sitemap:
> >
> > <map:generate type="template" src="showQuery">
> >   <map:parameter name="context-populator" src="com.MyPopulator"/>
> > </map:generate>
> The question is: do we really need this? Once can always use actions to
> populate request attributes with needed data. Looks like a duplication
> of functionality.

Is so, having such functionality might help to discourage having to
write actions anymore?   However, I believe you could also do this
inside flow...

-- 
Peter Hunsberger

Mime
View raw message