cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: Understanding continuations
Date Fri, 28 Mar 2003 11:49:45 GMT
Try setting a breakpoint on xmlForm.js, line 178:

174        this._sendView(uri, k);
175        // _sendView creates a continuation, the invocation of which
176        // will return right here: it is used to implement
177        // <xf:submit continuation="forward">
178        if (this.dead || cocoon.request == null) {
179            // this continuation has been invalidated
180            handleInvalidContinuation();
181            suicide();
182        }

That is where you will jump to when jswk.continuation(jswk) is called.

Hope this helps,

Chris

Ugo Cei wrote:
> Christopher Oliver wrote:
> 
>> What do you mean by "invalid continuation error"?
> 
> 
> I mean that the handleInvalidContinuation function in system.js is 
> called and it redirects to my handler page ... BUT ... the "id" 
> parameter is empty!
> 
> What I'm doing is this: I have an XMLForm with a submit button that is 
> like the following:
> 
> <xf:submit id="next" continuation="forward">
>     <xf:caption>OK</xf:caption>
> </xf:submit>
> 
> After the XMLForm transformation, this is sent to the browser as:
> 
> <input value="OK" type="submit" 
> name="cocoon-action-0d3e48210a8f347652091a6d463f6470716d154b" 
> continuation="forward">
> 
> I've added a few debug statements in xmlForm.js to see what's going on:
> 
>     var command = getCommand();
>     log.debug("xmlForm: command = " + command); //DEBUG
>     if (command != undefined) {
>         // invoke a continuation
>         var continuationsMgr =
> 
> cocoon.componentManager.lookup(Packages.org.apache.cocoon.components.flow.ContinuationsManager.ROLE);

> 
>         var wk = continuationsMgr.lookupWebContinuation(command);
>         wk.display(); // DEBUG
>         cocoon.componentManager.release(continuationsMgr);
>         if (wk != null) {
>             var jswk = wk.userObject;
>             jswk.display(); // DEBUG
>             jswk.continuation(jswk);
>             // note: not reached
>         }
>         handleInvalidContinuation(command);
>         return;
>     }
> 
> And these are the contents of flow.log:
> 
> DEBUG   (2003-03-28) 12:34.24:737   [flow] (/cefalee/arruolamento) 
> Thread-9/JSLog: xmlForm: command = 0d3e48210a8f347652091a6d463f6470716d154b
> DEBUG   (2003-03-28) 12:34.24:739   [flow] (/cefalee/arruolamento) 
> Thread-9/WebContinuation:
> WK: Tree
> WK: WebContinuation 0d3e48210a8f347652091a6d463f6470716d154b ExpireTime 
> [1048854377943]
> DEBUG   (2003-03-28) 12:34.24:741   [flow] (/cefalee/arruolamento) 
> Thread-9/WebContinuation:
> WK: Tree
> WK: WebContinuation 0d3e48210a8f347652091a6d463f6470716d154b ExpireTime 
> [1048854377943]
> 
> So it looks like the command is correct and both wk and jswk are valid 
> continuations, but the handleInvalidContinuation handler is always 
> called and with a null id! I'd like to debug this, but the debugger is 
> not able to step into the "jswk.contiunation(jswk)" call.
> 
> What is stranger is that I have another application that is using the 
> same Cocoon version (straight out of CVS this morning) and the same 
> techniques for form handling and this one works! I've been staring at 
> the code for 4 hours and still cannot see what is different between the 
> two. :-(
> 
>     Ugo
> 



Mime
View raw message