You'll notice there are 4 types of Validator form beans. 2 of the Dyna
variety and 2 of the original variety.  The ones with Action in their name
names like ValidatorActionForm and DynaValidatorActionForm should be
extended when you want validation based on (triggered by) an action received
by the struts processor.  The other validator form beans are for when a
particular form bean is used in an action.

So in the validation.xml file the <form name="????">  can have either an
action name (you better extend one of the validation action forms to work)
or a form name (you better extend one of the other validator form types).

That is about as clear as I can make it.  


-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 6:42 PM
To: 'Struts Users Mailing List'
Subject: RE: Coarse-grained DynaValidatorForm

Ted wrote:
> The Struts Validator actually keys on the ActionMapping attribute. By 
> default this is set to be the FormBean name, but you can set a different 
> attribute on the ActionMapping.
> So, on the ActionMapping, set a different attribute for each case, and 
> then specify a corresponding validator form using the same token.

I was going to say:
Override validate() and only call super.validate() when you want validation
to happen.

But Ted's idea sounds better, except that I haven't a clue what he's talking
about.

Is this anything like setting the "parameter" attribute of the <action> tag
for DynaValidatorForm, so it knows which method to call based on a request
parameter?

What attribute, other than validate="true", do you set on the <action> tag
to tell it which section of validation.xml to use?

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

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

Reply via email to