I suspect that is because ActionErrors is a subclass of ActionMessages so changing the 
signature of validate() to return ActionMessages instead would break any existing 
applications that call it.

By deprecating the ActionError and ActionErrors classes and leaving this signature 
unchanged, you will still get deprecation warnings, but the applications will still 
run.

Larry

>>> [EMAIL PROTECTED] 01/13/04 10:37 AM >>>
Hi David,

yes i saw, so i wondered, why the validate()
doesn´t return a ActionMessages.

and so i wanted to know the reason for this.

greetings

-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 13, 2004 6:27 PM
To: Struts Developers List
Subject: Re: Deprecated: ActionError


The ActionError class is deprecated, not any of the tags.  <html:errors>
and <html:messages> work with ActionMessages and ActionErrors objects.

If you look at the javadocs you'll notice that ActionErrors is fully
replaced by ActionMessages and ActionError is fully replaced by
ActionMessage.  ActionForm.validate() is the one place where you should
still use ActionErrors.  

David

--- Mark Lowe <[EMAIL PROTECTED]> wrote:
> Sorry I don't usually post this group but is there actually a sensible
> replacement for action errors yet?
> 
> That messages stuff still falls short of offering the same level of
> slickness that action errors does, perhaps this is due to he 
> html:errors tag but i personally and i imagine others all that 
> messagesPresent nasty mess.
> 
> There's still no clear means of accessing a single property of the
> messages vector/array/list (whichever it is). I've asked this question

> a few times on the user list, but what exactly is the replacement for 
> action errors and the accompanying tags.
> 
> <logic:messagesPresenet bla bla is disgusting and there's no obvious
> way to drill to the property in the common situation of wanting to 
> display an error by a form element.
> 
> Sorry wont post again, but its a tad irritating that something this
> useful is being deprecated in favor of some rancid camel's jism of an 
> alternative.
> 
>   Cheers Mark
> 
> On 13 Jan 2004, at 14:15, Matthias Wessendorf wrote:
> 
> > Hi,
> >
> > i watched at the sources and figured out, that
> > ActionError is deprecated so that i have to use ActionMessage. Okay.
> >
> > The add() in ActionErrors is also deprecated, because of first. 
> > fine.
> >
> > So i watched the Validator-Sources (class FieldChecks)
> > i saw there ist ActionMessages in use for "errors".
> > for the deliverd Methods.
> >
> > 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...
> >
> > 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:[EMAIL PROTECTED]
> > URL: http://www.wessendorf.net
> >
> >
> > --------------------------------------------------------------------
> > -
> > 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]
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
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]



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

Reply via email to