Scott Van Wart wrote:
> Right, but the difficulty here is that the validation then has to be
> done in the action, and I can't rely on the 'validate="true"' to use
> ValidatorForm's validate() method and dump my simple,
> non-database-reliant validations into validations.xml.

Many of us _never_ use the automagic validation.

For example, I used to split all my Actions into GET and POST handlers
(I almost always submit forms with POST). So my base Action's execute
method basically checks the request type. If it's a GET, just go to the
input. If it's a POST, call the form's validate method. If errors, go to
input, else process the post.

So I still keep all my simple, non-business-logic validations in the
validation config file.

> Anyways, what I may do is some kind of hybrid form/validation where
> the action validates the form and determines the appropriate forward
> on failure.  My only issue is the one mentioned above, where I'm not
> sure how to hook this into the validator mechanism.

Just call validate on the form: if it's a ValidatorForm or
ValidatorActionForm or subclass (or Dynas) it just works.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to