cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: Flow->Woody->Event->Woody... possible?
Date Wed, 14 Apr 2004 15:25:44 GMT

Phil Blake wrote:

> Hiya,
> In flow I create a woody form containing a list and a remove button. It 
> is shown using the form.showForm(...) method.
> When the remove button is pressed a woody javascript event is triggered.
> The script runs and builds a new form and again shows it using 
> form.showForm()
> However, the previous form is displayed. The logs show that the second 
> form was created and all bindings performed, transformed and serialized 
> as expected, but the the previous page is generated.
> Is this something to do with continuations being created inside 
> continuations?
> Is it possible to have a button on a woody form trigger a "javascript 
> event action" (whatever they are called) that shows another woody form?
> There are no samples that I can see where this is tried. Am I going 
> about it the wrong way?

the javascript event-handlers are there to handle events local to the 
form, you shouldn't give them the authority to go outside of the current 
form-scope IMHO
(I find it a pleasant surprise that your sample doesn't work, maybe 
someone with more internals knowledge could explain why this is the case)

not trying to subvert the relation between the form and it's actions you 
should 'complete' the form and go onto the next one

change the action into:
     <fd:submit id="remove" action-command="remove" >

and then after the form.showForm you test what 'completed' the form to 
decide on the next one to show:

     if (form.submitId == "remove") {


when looking for samples: see the 'switch' button in the aggregate sample.

Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                          

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

View raw message