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/12/07 17:59:41 UTC
[Woody] form.endFormProcessing() is not a function ???
Hello,
I want to make a cancel action. On Wiki pagaes I found fallowing method:
"After pressing an action button, the form will normally always be
redisplayed, unless the event handling code explicitely disables this
(*by using the endFormProcessing method on the form object*)."
So I did fallowing widget:
<wd:action id="cancel" action-command="cancel">
<wd:label>cancel</wd:label>
<wd:on-action>
<javascript>
event.source.form.endFormProcessing();
</javascript>
</wd:on-action>
</wd:action>
but unfortunately I receive fallowing error:
TypeError: endFormProcessing is not a function.
I couldn't also find "endFormProcessing" in Woody2.js.
How to use it or is there any other way to finish flow without
Validating form?
Regards,
Marcin Okraszwski
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [Woody] form.endFormProcessing() is not a function ???
Posted by Marcin Okraszewski <ok...@o2.pl>.
> <wd:submit id="cancel" action-command="cancel" validate="false">
> <wd:label>Cancel</wd:label>
> </wd:submit>
Yes, validate="false" is the key I didn't know of :-)
Thanks,
Marcin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [Woody] form.endFormProcessing() is not a function ???
Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 7 Dec 2003, at 16:59, Marcin Okraszewski wrote:
> Hello,
> I want to make a cancel action. On Wiki pagaes I found fallowing
> method:
>
> "After pressing an action button, the form will normally always be
> redisplayed, unless the event handling code explicitely disables this
> (*by using the endFormProcessing method on the form object*)."
>
> So I did fallowing widget:
>
> <wd:action id="cancel" action-command="cancel">
> <wd:label>cancel</wd:label>
> <wd:on-action>
> <javascript>
> event.source.form.endFormProcessing();
> </javascript>
> </wd:on-action>
> </wd:action>
>
> but unfortunately I receive fallowing error:
>
> TypeError: endFormProcessing is not a function.
>
> I couldn't also find "endFormProcessing" in Woody2.js.
>
> How to use it or is there any other way to finish flow without
> Validating form?
in the model:
<wd:submit id="cancel" action-command="cancel" validate="false">
<wd:label>Cancel</wd:label>
</wd:submit>
in the template :
<wt:widget id="cancel"/>
in the Flowscript:
. . .
form.load (bizdata);
form.showForm (formURI);
if ("cancel".equals (form.submitId)) {
// this was cancelled
. . .
}
// this was not cancelled
. . .
HTH
regards Jeremy