You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by See Yam Lim <sy...@NetVendor.com> on 2002/03/26 19:42:16 UTC

DynaValidatorActionForm

The key passed into the validator is the action element's 'path' attribute
from the struts-config.xml which should match the form element's name
attribute in the validation.xml.

Validator validator = StrutsValidatorUtil.initValidator(mapping.getPath(),
	                                                        this,
	                                                        application,
request,
	                                                        errors,
page);

i found the above javadoc and code that in DynaValidatorActionForm which i
think it should be the action element's 'name' attribute from the
struts-config.xml to form element's name attribute in the validation.xml.
Can anyone confirm me on that or tell me why otherwise?

Thanks so much!



See-Yam Lim


Re: DynaValidatorActionForm

Posted by David Winterfeldt <dw...@yahoo.com>.
I don't see anything wrong, but I wrote the javadoc so
I might be missing something.

DynaValidatorForm - uses the name of your form bean
(registrationForm) to retrieve the set of validation
rules

DynaValidatorActionForm - uses the name of your action
(/registration) to retrieve the set of validation
rules

These just give you a choice how you want to handle
storing/retrieving your validation rules.

The form element's name attribute in the
validation.xml is just a key used to store and
retrieve a set of validation rules.

David

--- See Yam Lim <sy...@NetVendor.com> wrote:
> The key passed into the validator is the action
> element's 'path' attribute
> from the struts-config.xml which should match the
> form element's name
> attribute in the validation.xml.
> 
> Validator validator =
> StrutsValidatorUtil.initValidator(mapping.getPath(),
> 	                                                   
>     this,
> 	                                                   
>     application,
> request,
> 	                                                   
>     errors,
> page);
> 
> i found the above javadoc and code that in
> DynaValidatorActionForm which i
> think it should be the action element's 'name'
> attribute from the
> struts-config.xml to form element's name attribute
> in the validation.xml.
> Can anyone confirm me on that or tell me why
> otherwise?
> 
> Thanks so much!
> 
> 
> 
> See-Yam Lim
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>