cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: [PROPOSAL] Continuation in objectModel, Was: Discussion of Flow Issues
Date Mon, 17 Mar 2003 02:47:04 GMT
Christopher Oliver wrote:

> Vadim Gritsenko wrote:
>> Christopher Oliver wrote:
>>> Sylvain Wallez wrote:
>> <snip/>
>>>> So we need two more values in the object model Map : one for the 
>>>> value dictionary, and one for the continuation.
>>>> How does it sound ?
>>> That would work.
>> Excellent! I've grepped sources, seen those awful 
>> ((Environment)resolver) type casts, and I think that we have to get 
>> rid of this ASAP.
>> Practical proposal:
>> * Add "flow-continuation" to the objectModel, and getter method to 
>> the ObjectModelHelper, as a replacement for "kont" environment 
>> attribute.
>> * Add "flow-bean" to the objectModel, as a replacement for 
>> "bean-dict" environment attribute.
> Switching to use the object model instead of environment attibutes is 
> the easy part.


> But there's still the question of how to expose those objects to the 
> author of the presentation layer.

AFAIK, there is already XSP logicsheet and some JPath transformer which 
do access flow continuation.
Flow support can be added to ScriptGenerator and ScriptAction in a same 
fashion as it was added to the VelocityGenerator. What other 
presentation layers has been left out?

> For example, in the case of Velocity, the names you've chosen (if 
> following Sylvain's suggestion: "... publishing the object model to 
> the Velocity engine could solve the problem") would be a poor choice, 
> because they aren't valid Velocity identifiers. 

Right now VelocityGenerator exports (as per javadoc):

 * <dt>request (org.apache.cocoon.environment.Request)</dt>
 * <dd>The Cocoon current request</dd>
 * <dt>template (java.lang.String)</dt>
 * <dd>The path of the template file currently being evaluated</dd>
 * <dt>response (org.apache.cocoon.environment.Response)</dt>
 * <dd>The Cocoon response associated with the current request</dd>
 * <dt>context (org.apache.cocoon.environment.Context)</dt>
 * <dd>The Cocoon context associated with the current request</dd>
 * <dt>parameters (org.apache.avalon.framework.parameters.Parameters)</dt>
 * <dd>Any parameters passed to the generator in the pipeline</dd>

It will be easy to add

 * <dt>flowContinuation (xxxx)</dt>
 * <dt>flowBean (xxxx)</dt>

And these should be valid values, right?


> Regards,
> Chris 

View raw message