cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <o...@wlkp.org>
Subject Re: Call continuations from flow instead of sitemap
Date Sun, 04 Apr 2004 12:45:43 GMT
On Sat, Apr 03, 2004 at 11:17:42PM -0800, Christopher Oliver wrote:
> >contManager = null;
> >try {
> > contManager = cocoon.getComponent
> >( "org.apache.cocoon.components.flow.ContinuationsManager" );
> >var wk = contManager.lookupWebContinuation( continuationId );
> >} finally {
> > if ( contManager != null ) 
> >   cocoon.releaseComponent( contManager );    
> >}
> >
> >cocoon.handleContinuation( wk.getContinuation() );
> >	lg
> > 
> >
> Uh, it doesn't actually work properly in general, as you noticed (with 
> page locals). Also Cocoon.handleContinuation() is an internal function 
> that shouldn't be called except by Cocoon itself. You're also not 
> passing correct arguments to it.
The source of cocoon.handleContinuation() couldn't be simpler :
FOM_Cocoon.prototype.handleContinuation = function(k, wk) {
    k(wk);
}

so I could do 
c = wk.getContinuation();

c();



Vadim proposed c(c) but this threw exception about uninitialized FOM_Request
(see my other mails in this thread)


Why is it so I can catch the Continuation in flow itself and then invoke it
but I cannot run a continuation that I did not catch myself?


You've written that the arguments I pass to handleContinuation are
incorrect. What is this second argument for ?

> 
> If you really think it should be possible to lookup a web continuation 
> and invoke it from a flowscript then make a proposal and see what people 
> think. If it turns out to be a good idea then a proper implementation 
> can be provided. However, currently it is _not_ a supported feature.
Sould 
I start a poll? make a bugzilla entry?
regards,
	lg

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/       ouzo@wlkp.org           _\\()//_
         .'/()\'.     Phone: +48(501)720812     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Mime
View raw message