struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rleland@apache.org" <lel...@speakeasy.net>
Subject Re: Deprecated: ActionError
Date Tue, 13 Jan 2004 15:49:44 GMT

> -----Original Message-----
> From: Matthias Wessendorf > Hi,
> 
> So i looked at our validate() in ActionForm,
> but there is still ActionErrors.
> 
> So i wondered, why the validator uses Messages and
> the validate() uses Erros...
Good Question:

We talked about this a few months ago on the struts-dev list.
I believe since we can't have both 
ActionMessages validate()
ActionErrors validate()

Some developers wanted to wait for Struts 2.0 to deprecate the method.
Some wanted to do it sooner.

There really isn't a reason why we couldn't add a
doValidate() method that returned a ActionMessages.


> 
> and also i saw, that the validator gets
> initialized with an ActionErrors-object in:  Resources.initValidator();
> 
> inside of initValidator()
> this happends:
> validator.setParameter(ACTION_ERRORS_PARAM, errors)
> 
> but "key" for errors is this:
>     private static String ACTION_ERRORS_PARAM =
>         "org.apache.struts.action.ActionMessages";
> 
> 
> the first parameter of "setParameter()" is called: "parameterClassName".
> so the errors gets initialized as an ActionMessages-object, isn´t?
> 
> 
> so question:
> why is the ActionErrors not deprecated?
> 
> in release-notes i saw:
> "Although not removed, in many cases you should replace the deprecated
> ActionErrors with the preferred ActionMessages to ensure correct
> operation."
> 
> 
> why not in all?
> 
> it would be fine, to know this ;-)
> 
> greetings
> 
> Matthias
> 
> 
> Matthias Weßendorf
> Email: mailto:matthias@wessendorf.net
> URL: http://www.wessendorf.net
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message