On 13.Dec.2002 -- 05:18 PM, Ugo Cei wrote:
> Dear flow gurus,
> 
> suppose I have an application that implements the following workflow:
> 
> 1. Present the user a form to be filled.
> 
> 2. When the user submits the form, present him a confirmation page, with 
> two buttons: "Confirm" and "Go back"
> 
> 3a. If the user presses "Confirm", perform some job (e.g. save form 
> field values to a database) and show a "thank you" page.
> 
> 3b. If the user presses "Go back", go to step 1.
> 
> I've tried to implement this use case in a flowscript like the following:
> 
> function foobar() {
>   // Note the use of the "new style" function names
>   sendPageAndWait("showform", {});
>   // Collect request parameters here
>   sendPageAndWait("askforconfirmation", { /* ... field values ... */ });
>   sendPage("thankyou", {});
> }
> 
> In the initial form and the confirmation page, I use forms with an 
> action of "kont(" + <jpath:continuation/> + ")".
> 
> In the confirmation page, I implement the "Go back" with a link to the 
> following URI: "kont(" + <jpath:continuation select="2"/> + ")".

Interesting. Why not:

 function foobar() {
   // Note the use of the "new style" function names
   var response = null;
   do {
       sendPageAndWait("showform", {});
       // Collect request parameters here
       sendPageAndWait("askforconfirmation", { /* ... field values ... */ });
       response = input("request-param","confirm"); // or 
request.getParameter("confirm");
   } while (response == null);
   sendPage("thankyou", {});
 }

        Chris.
-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to