cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers" <Ralph.Go...@dslextreme.com>
Subject Re: [RFC] "Cocoon Templates": Name and Tag Interface
Date Mon, 29 Nov 2004 23:35:36 GMT
Leszek Gawron said:
> 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.

That was my thought also.  My main point was that template should not
require flow.  The template should have a well defined way of obtaining
the items accessible to it so that an action or flow could set it up.

Ralphl


Mime
View raw message