see
http://struts.apache.org/userGuide/release-notes.html
--> Whats new
"Although not removed, in many cases you should replace the deprecated
ActionErrors with the preferred ActionMessages to ensure correct
operation."
reason is ActionErroR is deprecated...
ActionErrorS can't
--> validate() returns that guy. so with ActionMessages in validate()
there is no backward-compatibility
regards,
> -----Original Message-----
> From: Ng Chong Hin NCS [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 09, 2004 7:22 PM
> To: '[EMAIL PROTECTED]'
> Subject: Custom validators: ActionMessages vs ActionErrors
>
>
> Had installed Struts 1.2.1 on the local machine and
> everything runs smoothly ... except for my Struts 1.1 custom
> validators.
>
> Previously, the method signature in the validator was:
> "public static boolean validateFromToDate(Object bean,
> ValidatorAction va, Field field, ActionErrors oErrors,
> HttpServletRequest request)"
>
> Inside the method, when validation fails, a call to oErrors
> would throw a NullPointerException.
> "oErrors.add (field.getKey (), Resources.getActionError
> (request, va,
> field));
>
> Changing the method signature would resolve the NPE:
> "public static boolean validateFromToDate(Object bean,
> ValidatorAction va, Field field, ActionMessages oErrors,
> HttpServletRequest request)"
>
> Has anyone encountered this issue?
>
> Besides this, all seems to be well (so far)!
>
> Cheers, Chong Hin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]