|
Hi there,
I am using cocoon 2.1.5-dev (CVS 28/04/2004) to
perform form handling with the Cocoon Forms framework.
Everything works fine and the widgets get validated
nicely, however, when I try to add custom validation to the flowscript by
setting the form.validator it gets completely ignored.
var form = new
Form("forms/register.xml");
form.validator = function(form, bizdata) { var validationError = new Packages.org.apache.cocoon.forms.validation.ValidationError("xxx"); if (form.getWidget("login").getValue()
== "test")
{
form.getWidget("login").setValidationError(validationError); return false; } return true;
} form.showForm( get_page_name(), bizdata
);
I think the above code should be correct. I tried
to do some debugging and am sure that the validator function just doesn't get
called by the Forms class.
When I use the _javascript_ debugger I can't actually
get past the loadPageAndWait(). This is because when I break at the continuation
the debugger jumps to the function declaration of the last called function, does
however not go into the function when I tell it to.
Any ideas as to why this behaviour
occurs?
thanks,
Jakob
|
- Re: cocoon forms - flow custom validator Jakob Schwendner
- Re: cocoon forms - flow custom validator Bruno Dumon
- Re: cocoon forms - flow custom validator Jakob Schwendner
- Re: cocoon forms - flow custom validator Bruno Dumon
