You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric Chow <er...@gmail.com> on 2004/09/04 19:09:02 UTC

ActionError in Struts1.2 ???

Hello,

ActionError and ActionErrors are deprecated in Struts1.2,

We should use ActionMessages and ActionMessage to replace them.

But how can we identify which message is normal message and which one
represents error message ???

Eric

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


Re: ActionError in Struts1.2 ???

Posted by Bill Siggelkow <bi...@bellsouth.net>.
ActionErrors is not deprecated -- however, you can use ActionMessages 
just like you would ActionErrors (ActionErrors extends ActionMessages) 
-- what makes them get treated as errors is how they are saved -- 
saveErrors for errors and saveMessages for messages.

Eric Chow wrote:
> Hello,
> 
> ActionError and ActionErrors are deprecated in Struts1.2,
> 
> We should use ActionMessages and ActionMessage to replace them.
> 
> But how can we identify which message is normal message and which one
> represents error message ???
> 
> Eric


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


Re: ActionError in Struts1.2 ???

Posted by calandraca <ca...@gmail.com>.
ActionErrors is not deprecated, but saveErrors(HttpServletRequest
request, ActionErrors errors)  is. According to 1.2.2 javadoc you
should use saveErrors(HttpServletRequest, ActionMessages) instead,
dispite ActionErrors is a subclass of ActionMessages. I don't mind
because it has all functionallity I need and more. Don't you think
ActionErrors should be deprecated in order to avoid confusion?

On Sat, 04 Sep 2004 13:51:50 -0400, Rick Reumann <st...@reumann.net> wrote:
> Rick Reumann wrote:
> 
> > ActionMessages messages; and
> > ActionMessages errors;
> 
> Actually Bill is right and you can define these as ActionErrors and
> ActionMessages, ActionErrors is not deprecated.
> 
> 
> 
> 
> --
> Rick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Re: ActionError in Struts1.2 ???

Posted by Rick Reumann <st...@reumann.net>.
Rick Reumann wrote:

> ActionMessages messages; and
> ActionMessages errors;

Actually Bill is right and you can define these as ActionErrors and 
ActionMessages, ActionErrors is not deprecated.


-- 
Rick

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


Re: ActionError in Struts1.2 ???

Posted by Rick Reumann <st...@reumann.net>.
Eric Chow wrote:

> Hello,
> 
> ActionError and ActionErrors are deprecated in Struts1.2,
> 
> We should use ActionMessages and ActionMessage to replace them.
> 
> But how can we identify which message is normal message and which one
> represents error message ???

Use Action  saveErrors( request, ActionMessages )

as opposed to

Action saveMessages( reqeust, ActionMessages )

So typically in an Action method (execute or dispatch method) you may 
have two differnt ActionMessages...

ActionMessages messages; and
ActionMessages errors;

Then you add them as appropriate and use the appropriate saveErrors or 
saveMessages method in Action before forwarding.

-- 
Rick

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