cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Izhbulatov <>
Subject [ Flow ] Using continuations
Date Mon, 09 Aug 2004 13:41:38 GMT
Hi all! 

I was searching this mailing list and have found the message [1] where the 
problem was described which is very similar to the one I have faced with.
I just can't get what is the difference between calling one flow pipeline 
from another and incapsulating the same code in one flow script. 

As I already mentioned in my previous message [2], when I use single 
pipeline I have a problem with back button. So I considered this approach as 
wrong one.
And when I call cocoon.sendPageAndWait("another-pipeline"), I don't know how 
to return to the caller script. I don't understand how could I use 
continuation in this case. 

Below are my sitemap and flow script snippets: 

     <map:match pattern="edit-new/*">
       <map:call function="editClientNew">
         <map:parameter name="form-definition"
           value="forms/select-docs_form.xml" />
         <map:parameter name="data-base"
           value="xmldb:xindice-embed:///db/caclient/" />
         <map:parameter name="client-id"
           value="{1}" />

function editClientNew() {
   var form     = new Form(cocoon.parameters["form-definition"]);
   var clientID = cocoon.parameters["client-id"]; 


   // show a form for each document in the selection list
   var list = form.getModel().list;
   for(i = 0; i < list.length; i++) {
       cocoon.sendPageAndWait("edit-new/" + clientID + "/" + list[i]);

     <map:match pattern="edit-new/*/*">
       <map:call function="showForm">
         <map:parameter name="form-definition" value="forms/{2}_form.xml"/>
         <map:parameter name="doc-name" value="{2}"/>
         <map:parameter name="bindingURI" value="forms/{2}_bind.xml"/>
         <map:parameter name="dataURI"

function showForm() {
   var form = new Form(cocoon.parameters["form-definition"]);
   var bindingURI = cocoon.parameters["bindingURI"]
   var docName = cocoon.parameters["doc-name"];
   var dataURI = cocoon.parameters["dataURI"];
   var doc = loadDocument(dataURI);

   form.showForm(docName + "-display-pipeline");;

   saveDocument(doc, dataURI);



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message