cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: CForms flowscript API musings
Date Sun, 25 Apr 2004 16:08:42 GMT
Bruno Dumon wrote:

>I'm a bit annoyed by the current status of our flowscript API's for
>CForms. I'll leave the intro for what it is and just jump right into it:
>
>Form.showForm()
>===============
>I find that this function hides too much of how a form is processed, and
>stands in the way of doing more advanced stuff.
>
>I propose that instead of Form.showForm(), we just let the user control
>it:
>
>var form = new Form("my_form_definition.xml");
>var finished = false;
>while (!finished) {
>    cocoon.sendPageAndWait("my-pipeline", {"form": form});
>    finished = form.processSubmit();
>}
>
>In this scenario, you need to write 5 lines instead of one
>form.showForm() call. However, it provides several advantages:
>
>* You can pass multiple form objects to the sendPageAndWait call (the
>FTT supports referencing different forms using the location attribute on
>ft:form-template)
>
>  
>
Can you describe this in more detail or provide some pseudo code on how 
a page with multiple forms would be sent and processed (or point to the 
documentation if there is already something about this)?

Thanks,

Chris

Mime
View raw message