You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Radu Badita <ra...@gmail.com> on 2004/11/22 15:41:18 UTC
Alternate bundle with ActionMessage
Hi,
I have a problem related with using a keyed MessageResources in a
module and creating an ActionMessage with keys from it. Sorry if it
has been discussed before, but I haven't found anything searching the
list...
So here it is: in my module I have defined a message-resource with a
key (let's say "myresources") and when the form is validated I want to
create an ActionMessage specifying a key from this resource. My
question is how should I do this?
If I "manually" get a message from the resource like this:
String paramLabel = ((MessageResources)
request.getSession().getServletContext()
.getAttribute(Constants.MESSAGE_BUNDLE))
.getMessage("reports.param." + paramId + ".prompt");
it works fine. But how do I construct an ActionMessage with another key from it?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org