On Mar 31, 2008, at 4:46 AM, Tobia Conforto wrote:
I thought this would be easy to accomplish with continuations, but
I'm hitting a strange bug. This is the utility function I'm calling
from my flows, AFTER the form has been processed (DB inserts, emails
sent, etc), just BEFORE doing the sendPage() with the result page:
function redirectToGet() {
var done = false;
var cont = cocoon.createWebContinuation();
if (! done) {
done = true;
cocoon.redirectTo('/cont=' + cont.id, true);
This redirect URL does not seem to be correct: should start with '?'
if passing continuation id as parameter or have '/' instead of '=' if
passing continuation id in URL path.
cocoon.exit();
Hm, what is this exit() method? I don't see it defined neither in
Cocoon 2.1 nor 2.2.
To terminate script processing and send redirect to browser you should
be using suicide method. Something like that:
cocoon.redirectTo('foo?cont=' + cont.id, true);
FOM_Cocoon.suicide();
Vadim
}
}
The problem is:
- if I leave out the cocoon.exit(), I get:
IllegalStateException: Pipeline has already been processed for this
request
- if I put the cocoon.exit() as shown, I get:
ProcessingException: Attempted to process incomplete pipeline
What gives?
I'm using Cocoon 2.1.10
Tobia
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]