On Aug 1, 2006, at 1:07 AM, Ard Schrijvers wrote:
I never used (saw :-) ) this createPageLocal untill now,
Huh, I sent a reply on this thread suggesting createPageLocal() last
week, oh well... :-)
and looked at http://cocoon.apache.org/2.1/userdocs/flow/api.html, but
I don't really get this one. You don't need a sendPageAndWait using
this one? Otherwise, the sendPageAndWait would hold the normal
continuation, right? I don't see what I gain with createPageLocal if
I still need a sendPageAndWait which creates a continuation. Could you
explain a little more, because I am very curious,
It's still a "normal continuation" created by sendPageAndWait. The
thing that is special is not the continuation, but the object.
var state = createPageLocal();
state.step = 'Step 1';
cocoon.sendPageAndWait('foo');
...
state.step = 'Step 2';
cocoon.sendPageAndWait ('bar');
Now if I hit the 'back' button after the second page, then continue
from the first page, when the first continuation is reinvoked then
state.step will have the value 'Step 1'. Does that example help?
BTW, resource considerations aside, you need "global"
(continuation-independent) state for things like being able to detect
when the user has re-submitted a form (e.g., the "Yes, charge my credit
card now!" form :-)
best regards,
—ml—
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]