Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.1.0
-
None
-
Operating System: other
Platform: Other
-
30401
Description
In an Action it is not possible to declare what resource bundle an ActionMessage
should come from. The ActionMessage class should include an optional property
to declare the name of the property file/ResourceBundle to get the value from.
In your struts-config.xml if you have defined a message resource like the following.
<message-resources
key="error_resources"
parameter="org.apache.resource.error" null="false"/>
You should be to create an ActionMessage as follows
ActionMessage am = new ActionMessage("error_resources", "login.failed");
This would use the "error_resources" bundle to lookup the key "login.failed"
instead of the default global resource bundle.
Additionally, the MessagesTag.java would have to change in the doAfterBody
method (~line 308 revision 1.16) in order to support the new functionality.
Attachments
Issue Links
- incorporates
-
STR-560 The exception handling declaration in the DTD doesn't allow you to pick a bundle for the key
- Reopened