cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <ive...@iname.com>
Subject Re: [RT] Web Wizard Best Practices
Date Tue, 19 Mar 2002 02:55:20 GMT
<snip-things-I-understand/>

> >
> > > > >     populate(objectModel, "feedbackform",
> > "cocoon-installation/user/*");
> > > > >
> > > > >     List errors = validate(objectModel, "feedbackform",
> > > > "cocoon-installation/user/*");
> >
> > Can you explain a bit more why the 2rd argument is XPath.
> > Wouldn't it be more natural to make a call like:
> >
> > Validator v = new SchematronValidator( "mysche-report.xml");
> > ValidationResult vr = v.validate(myJavaBean); // or
v.validate(myDomNode);
>
> But how would you specify exactly *what* from the instance you want to
> validate... (mind the checkboxes)

In the case of the Schematron validator, you would use the "phases" concept.

(SchematronValidator)v.setPhase("no checkbox validation, only name and
email");
v.validate(myJavaBean)

However I see your point and validating parameters should probably be
different for different Validator implementations.
To generalize the Validator interface:

interface Validator
  {
  public ValidationResult validate( Object );
  }

then each specific validator can provide additional setters for preparing
the validate() call.

> > > > Sorry to repeat myself, but would you mind submitting the feedback
> > wizard
> > > > requirements which you were thinking about.
> > >
> > > I did already....
> >
> > I think I haven't received it yet.
>
> I'll have a look into my postponed folder;)

please...



Ivelin

>
> cheers
> --
> Torsten
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message