cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel Action.java AggregateField.java BooleanField.java Field.java Form.java Messages.java MultiValueField.java Output.java Repeater.java Union.java Upload.java
Date Fri, 30 Apr 2004 14:20:31 GMT
On Fri, 2004-04-30 at 16:15, Vadim Gritsenko wrote:
> bruno@apache.org wrote:
> 
> >  Drop FormContext from validate method.
> >
> 
> May be this was already answered, but how, say, validator can perform 
> City/State/Zip validation against zip database? Would it need this 
> FormContext or it has access to something else?

FormContext only contains the request and the locale, so that wouldn't
have helped much.

If you add validators to the form instance (ie calling
widget.addValidator in the controller/flowscript code) you can make
yourself that the validator has access to all it needs.

For the "static" validators defined as part of the form definition, we
could apply the Avalon lifecycle to them so they can get a
ServiceManager.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message