You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by stefan pickschneider <st...@s1998.tu-chemnitz.de> on 2005/04/13 18:56:14 UTC

Flows & Continuations

Hello everybody,

we have a problem using continuations...

we have two forms: editParent and editChild -
both use flowscript.

in the editparent form is a repeater that shows
the assigned child. if the user adds an child
the editChild form is opened.

so far we couldn't figure out how one can return to the
continuation-state of the flowscript editParent.js after
finishing flow editChild.js.
both forms are opened in the same window.


editParent.js looks like
...
while (true) {
	...
	form.showform("editParent-showform");
	...
	if (addChild) {
		form.sendPageAndWait("editChild.html");
		// >>> continue here after editChild is done
		// add child to repeater
	}
	if (save) {
		break;	
	}
}

editChild.js
...
form.showform("editChild-showform");
...
// return to parent continuation
// HOW?


We have tried to submit the current continuation id of the parent
to the editChild flow  /*{"continuationId":cocoon.continuation.id}*/
and after the child form is saved redirecting back to this id,
but only an empty editParent form is shown - the continuation doesn't
seem to be resumed.


Any ideas?
Thanks a lot!
stefan.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Flows & Continuations

Posted by stefan pickschneider <pi...@freenet.de>.
Hi,

>> we have a problem using continuations...
[...]
> 
> function editParent() {
[...]
> }
> 
> function addChild( parent ) {
[...]
> }

We'll tried it this way - looks promising.

Thanks a lot!
stefan.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


[Job] Cocoon developers wanted

Posted by Matthew Langham <ml...@s-und-n.de>.
Hi,

We are looking to expand our team of Cocoon developers ASAP <-- <insert
emphasis here>. 

We are working on various Cocoon based projects for large German-speaking
corporations in cities such as Düsseldorf, Frankfurt, Vienna and of course
Paderborn :). Freelance work may also be an option. So, if you speak German
and would be interested in becoming part of our team then please feel free
to send me your CV or email me off-list to discuss this in more detail. 

Freundliche Grüße / With kind regards

Matthew Langham

-- 

S&N AG
Competence Center Open Source
Klingenderstr. 5 
D 33100 Paderborn

voice  +49 5251/1581-30
fax    +49 5251/1581-71
eMail  mlangham@s-und-n.de
Web    http://www.s-und-n.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


[Job] Cocoon developers wanted

Posted by Matthew Langham <ml...@s-und-n.de>.
Hi,

We are looking to expand our team of Cocoon developers ASAP <-- <insert
emphasis here>. 

We are working on various Cocoon based projects for large German-speaking
corporations in cities such as Düsseldorf, Frankfurt, Vienna and of course
Paderborn :). Freelance work may also be an option. So, if you speak German
and would be interested in becoming part of our team then please feel free
to send me your CV or email me off-list to discuss this in more detail. 

Freundliche Grüße / With kind regards

Matthew Langham

-- 

S&N AG
Competence Center Open Source
Klingenderstr. 5 
D 33100 Paderborn

voice  +49 5251/1581-30
fax    +49 5251/1581-71
eMail  mlangham@s-und-n.de
Web    http://www.s-und-n.de


Re: Flows & Continuations

Posted by Leszek Gawron <lg...@mobilebox.pl>.
stefan pickschneider wrote:
> Hello everybody,
> 
> we have a problem using continuations...
> 
> we have two forms: editParent and editChild -
> both use flowscript.
> 
> in the editparent form is a repeater that shows
> the assigned child. if the user adds an child
> the editChild form is opened.
> 
> so far we couldn't figure out how one can return to the
> continuation-state of the flowscript editParent.js after
> finishing flow editChild.js.
> both forms are opened in the same window.
> 
> 
> editParent.js looks like
> ...
> while (true) {
>     ...
>     form.showform("editParent-showform");
>     ...
>     if (addChild) {
>         form.sendPageAndWait("editChild.html");
>         // >>> continue here after editChild is done
>         // add child to repeater
>     }
>     if (save) {
>         break;   
>     }
> }
> 
> editChild.js
> ...
> form.showform("editChild-showform");
> ...
> // return to parent continuation
> // HOW?
function editParent() {
   var form = new Form( ... );
   var parent = getParentFromSomewhere();
   form.load( parent );

   while( true ) {
     form.showForm( "uri" );
     if ( form.submitId == "cancel" ) {
        cocoon.sendPage( "finish" );
        break;
     } else if ( form.submitId == "addChild" ) {
       addChild( parent );
       form.load( parent );
     } else if ( form.submitId == "ok" ) {
       form.save( parent );
       persist( parent );
       cocoon.sendPage( "finish" );
     }
   }
}

function addChild( parent ) {
   var form = new Form( ... );
   var child = new Child();
   child.parent = parent;
   while ( true ) {
     form.showForm( "uri" );
     if ( form.submitId == "ok" ) {
       form.save( child );
       parent.addChild( child );
       return;
     } else {
       return;
     }
   }
}

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org