Thanks a lot.  it works for me.
Denis

-----Original Message-----
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2003 11:55 AM
To: 'Struts Users Mailing List'
Subject: RE: struts: error/message handling: saveErrors


Instead of doing a new ActionErrors I have a function in my base Action
(U can just put it in the action that your are working on Baction).

    public ActionErrors getErrors(HttpServletRequest request){
        if (request.getAttribute(ERROR_KEY) != null) {
            return (ActionErrors) request.getAttribute(ERROR_KEY);
        }
        return new ActionErrors();
    }

Use this inside the execute.
        ActionErrors errors = getErrors(request);

 
Varun

-----Original Message-----
From: Denis Wang [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2003 10:48 AM
To: Struts Users Mailing List
Subject: struts: error/message handling: saveErrors


Hello, all,

I have the following problem:
In ActionA{
        ....
                ActionErrors errors = new ActionErrors();
                errors.add( ActionErrors.GLOBAL_ERROR, new ActionError(
"Afailed" ) );
                saveErrors( request, errors );
}

In ActionB{
        ....
                ActionErrors errors = new ActionErrors();
                errors.add( ActionErrors.GLOBAL_ERROR, new ActionError(
"Bfailed" ) );
                saveErrors( request, errors );
}

When ActionA returns it will forward the processing to ActionB and then
the "Bfailed" error will override the "Afailed" error.

How can I show both "Afailed" and "Bfailed" error messages?  Thanks a
lot! Denis



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