You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marcin Okraszewski <ok...@o2.pl> on 2003/11/28 14:57:50 UTC

Woody: can I call other woody flow from current flow?

Hi,
I have a woody form which is handled by flow. As an option in current 
form I would like to give possibility to fill other woody form, which is 
also a flow. As the user ends with called flow I would like to come back 
to previous flow (or woody form).

I would like to do it like that:

// ...

do {
   form.showForm("step1.html");
   if (form.submitId == "add-user")
     // the function I don't know
     call_woody_form("user.html")
while(form.submitId != "next");

// ...

Is it possible to do such thing? Is it also possible to pass a bean the 
called form should use?

Regards,
Marcin Okraszewski

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


Re: Woody: can I call other woody flow from current flow?

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 28 Nov 2003, at 13:57, Marcin Okraszewski wrote:

> Hi,
> I have a woody form which is handled by flow. As an option in current  
> form I would like to give possibility to fill other woody form, which  
> is also a flow. As the user ends with called flow I would like to come  
> back to previous flow (or woody form).
>
> I would like to do it like that:
>
> // ...
>
> do {
>   form.showForm("step1.html");
>   if (form.submitId == "add-user")
>     // the function I don't know
>     call_woody_form("user.html")
> while(form.submitId != "next");
>
> // ...
>
> Is it possible to do such thing? Is it also possible to pass a bean  
> the called form should use?

I have never tried this before, but I hope it would work .... I need to  
something similar.

Have a look at  
cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/ 
javascript/woody2.js, you can see how a Woody Form Object is created  
from scratch.

You can see from the 'woody' method that you need to create a new form,  
using the source of a form definition, and then optionally setup the  
binding on it.

I would assume if you wrote a function that could do this, then you  
would be able to call that function from the position indicated in your  
code.

HTH

regards Jeremy