You can use action errors kind of like mini-macros.
String bloop = "blooper";
String bleep = "bleeping";
error.msg='The {0} is not {1}"
actionErrors.add("bloopbleep",new ActionError("error.msg", bloop, bleep));
... will result in:
The blooper is not bleeping.
... for further explaination and limitations on use, please consult the
JavaDocs =)
HTH,
Eddie
----- Original Message -----
From: "Struts Newsgroup (@Basebeans.com)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 03, 2002 3:40 PM
Subject: Help with ActionErrors
> Subject: Help with ActionErrors
> From: "Brian Pembroke" <[EMAIL PROTECTED]>
> ===
> Is it possible to add a string to an ActionError instead having it get the
> string out of the properties file. I need to be able to give dynamic
error
> messages that are changing.
>
> ActionErrors errors = new ActionErrors();
> errors.add(ActionErrors.GLOBAL_ERROR, new
> ActionError(Dynamic String));
> saveErrors(request, errors);
>
> Thanks,
> Brian
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>