If by ValidatorActionForm you mean ValidatingActionForm then I can't
(shouldn't). It recommends what I suggested as a possible solution in the
original post. That is, overriding the UserForm and using that form for the
appropriate action mapping in the struts-config.xml. I would be overriding
the validate() of UserForm which is overriding validate() of ActionForm. I'm
using struts 1.0.2 btw.

Javadocs for ValidatingActionForm
"Deprecated. Application ActionForm beans should now extend ActionForm
directly, and override the validate() method if they wish to provide such
services"
thanks,
Mike

----- Original Message -----
From: "Dave Derry" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 3:26 PM
Subject: Re: Validator later rather than sooner?


> You can also validate based on the action rather than the form. Just use
the
> action type rather than the form name, and be sure to extend
> ValidatorActionForm rather than ValidatorForm.
>
> Dave Derry
>
> ----- Original Message -----
> From: "bachan s" <[EMAIL PROTECTED]>
>
>
> >
> > Instead of writing different action forms you can have different entries
> in your struts config with the same Object type (i.e action form ).In this
> was you can have different rule for each form using the validator
framework.
> > Does this sound feasible.
>
> >  Michael Lee <[EMAIL PROTECTED]> wrote:Along the same thread, we are
> having a validation design problem.
> > We have broken most of our Action classes up into multiple classes.
Before
> > we had one and used the property in the action mapping. That makes the
> > Action classes much more readable.
> > Problem is, these action classes still just use one ActionForm. This
> > ActionForm's validation method checks the parameter because the
validation
> > for each page is different. This is starting to get large and unwieldy.
I
> > don't want to have to create basically the same ActionForm for each
Action
> > class when they are all mostly the same.
> > Question is, what is a clean way of breaking up all these validations?
> > Should I continue to check the action parameter and validate against it
> > within the same validation method for that one Action form? I was
thinking
> > of extending the UserForm (the ActionForm in question) and just
> implementing
> > the validation method. This way I could also get rid of the parameter in
> the
> > action mapping of the struts-config.xml.
> > Thanks,
> > Mike
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to