RE: Unable to get ActionEroor messages
"Reddy, Koti" <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <D54405EC0F55E4469575EF939BA6CD864A02EA@ustjc3exmail01.ustrust.global.schwab.com> |
Hi Alex,
But why am I seeing my keys in the xml document?
<errors>
<assignTo />
<prodLineCd />
</errors>
It should show <errors></errors> right?
I don't think it is a different request to the server. I am saying
redirect="false" in the struts-config file. So it should use the same
request.
Here is the snippet of my config xml
<action name="appAcctActionForm"
type="com.ustrust.acm.strutscx.action.AppAcctSaveAction"
path="/approve_acct_save"
validate="false"
redirect="false">
<forward name="acctMgtTasks" path="/acct_mgmt.do" />
<forward name="error" path="/approve_acct_open.do"
/>
<forward name="viewFilledForm"
path="/approve_acct_open.do?debugxml=true" redirect="false"/>
</action>
and this is what I do in my action class
request.setAttribute("appAcctActionForm", appAcctBean);
request.setAttribute("errors", actionErrs);
return (mapping.findForward(StrutsCXConstants.FORWARD_FILLED_FORM));
Let me know if I am doing anything wrong?
Thank you
Koti Reddy
-----Original Message-----
From: Alexander Bischof [mailto:[email protected]]
Sent: Thursday, June 17, 2004 10:26 AM
To: Reddy, Koti
Cc: [email protected]
Subject: Re: [Strutscx-user] Unable to get ActionEroor messages
Hello Reddy,
i have the same behavior, but i think this is correct. When you want to
see the XML document, you send a new request to the server, where now no
error is set.
@all Correct me, if i'm wrong.
greets
Alex
Reddy, Koti wrote:
> Hi Guys,
>
> I am unable to get the ActionError messages in the xml document.
> It gives the keys but not the error message. I would appreciate if any
> one can help me in this.
>
>
>
> This is what I do in my formBean
>
> ActionErrors errors = new ActionErrors();
>
>
>
> errors.add("assignTo",new ActionError("PRODUCT LINE AND PRODUCT
> ARE NOT GOOD"));
>
> errors.add("prodLineCd",new ActionError("PRODUCT DESCRIPTION IS
> NOT GOOD"));
>
>
>
> logger.info(THIS_CLASS + "AFTER ADDING ACTIONERRORS");
>
> return errors;
>
>
>
> and this is what I see when I do debugxml=true
>
>
>
> - <!--
>
>********** ERROR PARAMETERS **********
>
> * * -->
>
> *-* <http://ustjc3asdv1:7001/acm/approve_acct_save.do##> <errors>
>
> * * <assignTo />
>
> * * <prodLineCd />
>
> * * </errors>
>
>
>
---------------------------------------------------------------------
The message contains confidential and/or legally privileged
information and is intended for use by the indicated addressee.
If you are not the intended addressee: (a) any disclosure,
reproduction, distribution or action you take because of it is
strictly prohibited; (b) please return the complete message to the
sender; and (c) this message is not a solicitation for purchase or
sale or an agreement of any kind whatsoever that binds the sender.
---------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND