You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roberto Lima Jr <ro...@softsite.com.br> on 2006/03/26 22:23:09 UTC

Get all messages

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");
}

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Get all messages

Posted by Martin Gainty <mg...@hotmail.com>.
Roberto
Why not just retain the 2nd (message) parameter for your ActionErrors in 
some sort of variable to be references in getMessage accessor later on?
Anyone else ?
Saludos!
Martin-
----- Original Message ----- 
From: "Roberto Lima Jr" <ro...@softsite.com.br>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Sunday, March 26, 2006 3:23 PM
Subject: Get all messages


> 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");
> }
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org