I find things like this disturbing:

=== cut here ===
BeanValidatorForm: Validating ActionForm 'eddForm' using key
 'AddBoxAction' for mapping '/AddBoxAction'
RequestProcessor:   No errors detected, accepting input
=== cut here ===

If validator cannot not match key and mapping, should not it throw an
exception right away, instead of accepting input? Is not this a bug?

Michael.

On 5/10/05, Vincent <[EMAIL PROTECTED]> wrote:
> took the leading "/" in validation.xml. Works like a charm now.
> Thanks!
> 
> Niall Pemberton wrote:
> > If you use "setPathValidation(true)" it uses a key of the path name - with
> > the leading "/" stripped off. Either you need to specify the form name in
> > your validation.xml without the leading "/" - or in your custom class
> > override the getValidationKey() method (rather than using  the
> > setPathValidation() method):
> >
> > public String getValidationKey(ActionMapping mapping,
> >                               HttpServletRequest request) {
> >     return mapping.getPath();
> > }
> >
> > Niall
> >
> > ----- Original Message -----
> > From: "Vincent" <[EMAIL PROTECTED]>
> > Sent: Tuesday, May 10, 2005 5:47 PM
> >
> >
> >
> >>Hello All,
> >>As the subject says I am having some trouble
> >>trying to validate a LazyValidatorForm. Using the great examples
> >>on the LazyValidatorForm page I created a custom class with
> >>the required: setPathValidation(true) in the
> >>constructor.
> >>
> >>The Action path calling the form is "/AddBoxAction"
> >>and validation= "true"
> >>
> >>
> >>the following is from validation.xml:
> >>
> >>  <form name="/AddBoxAction">
> >>   <field property="howManyNewBoxes"
> >>    depends="required">
> >>            <msg key="errors.required" name="required"/>
> >>             </field>
> >>         </form>
> >>
> >>
> >>The above is just the latest iteration, nothing I try seems
> >>to have any effect at all on what I type in this text field.
>
> from the log I get:
> 
> RequestProcessor: Processing a 'POST' for path '/AddBoxAction'
> RequestUtils:  Looking for ActionForm bean instance in scope 'session'
> under attribute key 'eddForm'
> RequestUtils:  Can recycle existing ActionForm instance of type
> 'xxx.webapp.forms.NestedLazyForm'?: true
> RequestUtils:  --> [EMAIL PROTECTED]
> RequestProcessor:  Storing ActionForm bean instance in scope 'session'
> under attribute key 'eddForm'
> RequestProcessor:  Populating bean properties from this request
> RequestProcessor:  Validating input form properties
> BeanValidatorForm: Validating ActionForm 'eddForm' using key
> 'AddBoxAction' for mapping '/AddBoxAction'
> RequestProcessor:   No errors detected, accepting input

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

Reply via email to