Hi, Patrice:
That works. Thank you so much!
One more question. If I have two or more dynamic data which I want to display them in 
the error message. How can I achieve that using the above approach? 
Thank you.
Cathy
 
 Patrice <[EMAIL PROTECTED]> wrote:Hi,

You can specify dynamic data in your errors like this:
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.amount",
dynamicAmount));
where dynamicAmount contains the amount you want to display in your error
message.

In your ApplicationResource.properties:
error.amount=you can't retrieve more that {0} dollars

{0} will be replaced by the content of dynamicAmount.

Hope it helps
Patrice

----- Original Message -----
From: "Cathy Osekizoglu" 
To: "Struts Users Mailing List" 
Sent: Thursday, November 28, 2002 8:12 PM
Subject: display error message including dynamic data


>
> Hi:
> According to the result from my action class, I need to display message to
user using the dynamic data.
> This is what I am doing: In my action class, I got the result that user
can only retrieve maximum 50 dollars from his credit card. When user try to
retrieve more than 50 dollars, I want to display the error message: " you
can't retrieve more that 50 dollars". (50 is dynamic data here). In my
action class, I have errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("error.amount")); in my Jsp, I have . How can I
achieve it in ApplicationResource.properties?(I am using struts1.1-b2).
> Thank you very much for your reply
>
>
>
> ---------------------------------
> Post your free ad now! Yahoo! Canada Personals
>


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Post your free ad now! Yahoo! Canada Personals

Reply via email to