Roberto Lima Jr wrote:
Hi, evereyone,
I need to check if a message was specified in my application.properties
before create an ActionError whith this error.
Example:
if (hasMessage("error.text.required")) {
message = new ActionMessage("error.text.required");
}else {
message = new ActionMessage("error.default.message");
}
Does anybody know how to implement the "hasMessage" method???
Thanks!
How about something like
MessageResources msgs = getResources();
if (msgs.getMessage(getLocale(), "error.text.required") {
message = new ActionMessage("error.text.required");
} else {
message = new ActionMessage("error.default.message");
}
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]