cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: Bug in Forms v1, 2 & 3 using Cocoon v2.1.5, flow, javascript validation and debugging
Date Wed, 09 Jun 2004 00:16:44 GMT
On 08.06.2004 23:20, Yatin Shah wrote:

> My requirement:
> Perform business level validation to ensure the entered data are valid 
> before notifying the user that
> their form request is accepted and refreshing the web page with 
> acceptance message.
> [business level: requires access to external database for checking valid 
> values.]
> Pre 2.1.5 solution:
> Define a javascript function, a part of the flow script, to do business 
> validation processing and associate this function with the form using:

> A. "I used fd:javascript though where only external validation functions 
> are called. So I determine how a field has to be validated in the form 
> definition, but the validation itself is scripted in external js 
> files."  
> Joerg, can you give more details! Is it possible to access flow 
> variables from your external js file?

I have a file validate.js that has some validateXYZ() functions in it. 
validate.js is added to the sitemap like any other flowscript js file. 
In the form definition I have:

       return validateXYZ(widget);

> B. "On each widget, you can add validators using the 
> Widget.addValidator(...) method. The argument is an implementation of 
> WidgetValidator. See the javadoc of that interface for more details on 
> what an implementation of a WidgetValidator is supposed to do." 
> This seems to be for individual widget level validation support. How can 
> this be used for the form level validation? A sample code will be very 
> helpful.

Bruno explained some more details here:


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

View raw message