cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: Woody-flow to FOM migration question
Date Fri, 18 Jul 2003 04:37:40 GMT
Bruno Dumon wrote:

>FOMmers, Chris mostly,
>
>I'm looking at porting the Woody-Flow integration to the FOM. This is
>all new stuff for me, but just to check that I'm on the right track: is
>it correct that things like new WebContinuation(...) and
>cocoon.forwardTo(...) can now only be done in Java code?
>  
>
Yes.

>And that brings up a more essential point: the reason for not using
>sendPageAndWait? I guess it's because of the tricks with the
>lastWebContinuation thing,
>
Yep.

> but I don't understand the purpose of that.
>If my intuition is right it forces the parent continuation of the new
>continuation to be the last created continuation for this form, rather
>than the current continuation. There's a note that this will be used to
>implement automated back navigation, but I don't get it yet. Could you
>give some more explanation?
>
>  
>
The way it works is that a continuation is created immediately before a 
page is sent and immediately after it is sent (the latter is just like 
what sendPageAndWait does).

To go "forward" in the form you invoke the latter continuation, again 
just like sendPageAndWait().

But to go "back" you invoke the continuation 3 levels higher in the tree:
 
  level 0) causes the actions after the current page is submitted to be 
performed (this is "forward", as above)
  level 1) causes the current page to be resent
  level 2) causes the actions after the previous page was submitted to 
be performed
  level 3) causes the previous page to be resent  (this is "back")

So to implement automated back/forward navigation you simply encode the 
continuation id and the desired action ("back" or "forward") somehow in 
the form. Then when the form is submitted you invoke the appropriate 
continuation.

Regards,

Chris


Mime
View raw message