Tim Christopher wrote:
Hi,

Can anyone let me know when an ActionError should be used in place of
an ActionMessage, or visa versa.  It seems like the ActionMessage is
preferred as it does not encourage markup to be placed within the
resources file.

Does this mean I should always use the ActionMessage, or does the
ActionError come in useful for certain situations?

Yes. ActionError is deprecated. http://struts.apache.org/api/org/apache/struts/action/ActionError.html

However you may still use 'ActionErrors' to store you 'ActionMessage's that represent an error, but note that
saveErrors(HttpServletRequest, ActionErrors)
is deprecated in favour of
saveErrors(HttpServletRequest, ActionMessages)
(which still has 'Errors' in it's name!)
This means you probably have to call it with
saveErrors(request, (ActionMessages)actionErrors)
(as ActionErrors is a subclass of ActionMessages anyway!)
(ActionError was also a subclass of ActionMessage)



All this seems odd, so please correct me if I'm wrong.

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



Reply via email to