Hi Nuwan,
Actually I am using Form and this method is available in Action class
On 11/15/06, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:
Ops..,, sorry ignore the last mail..
It should be.. first call the getResources() and get the MessageResource
and
from there u can get the message..
eg:-
I was wrong... ignore my earlier mail..
Thanks.
Anil.
-Original Message-
From: Hanmay Udgiri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 15, 2006 1:56 PM
To: user@struts.apache.org
Subject: Query in action messages
Hi
I am doing validation in my Action Form which is extending
Val
There is empty space before the key.. just observe..
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip
Code"));
should like ...
errors.add(Error_FIELD_KEY,new ActionMessage("error.required","Zip
Code"));
hope it helps you...
Anil.
-Original Message-
From
Hi,
Yes. When u use. errors.add(Error_FIELD_KEY,new ActionMessage("
error.required","
error.zipcode"));
It will just replace what ever u pass as the second argument with the
"{0)". Second way is correct...
Regards,
Mano
-Original Message-
From: Hanmay Udgiri [mailto:[EMAIL PROTECTED]
Ops..,, sorry ignore the last mail..
It should be.. first call the getResources() and get the MessageResource and
from there u can get the message..
eg:-
errors.add(Error_FIELD_KEY,new ActionMessage("
error.required",getResources(request).getMessage("error.zipcode"));
Regards,
Nuwan
--
Hi,
there is a method called getMessage(), use that one and get the message from
the resource bundle,
eg:_
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required",
getMessage("error.zipcode")));
Regards,
Nuwan
- Original Message -
From: "Hanmay Udgiri" <[EMAIL PROTECTED]>
6 matches
Mail list logo