Issue Details (XML | Word | Printable)

Key: STR-559
Type: Improvement Improvement
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Paul Benedict
Reporter: Chuck Cavaness
Votes: 3
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

Using Multiple Resource Bundles for an Application

Created: 10/Apr/02 03:29 AM   Updated: 26/Nov/06 08:10 PM
Return to search
Component/s: Core
Affects Version/s: 1.2.9
Fix Version/s: 1.3.5

File Attachments:
  Size
Text File 7892_diff.txt 2003-02-21 09:43 PM A Stephen 1 kB
Text File 7892_explain.txt 2003-02-21 09:58 PM A Stephen 3 kB
Environment:
Operating System: other
Platform: Other

Bugzilla Id: 7892


 Description  « Hide
When using multiple resource bundles for an application, there are some issues
that make it tricky to create ActionErrors. Because you can only specifiy the
bundle for the ErrorsTag at the collection level, every ActionError object in
the collection must come from the same bundle. This is not a huge issue, but
limits the natural way an application may choose to setup it's bundles.

Wouldn't it be better if you specified the bundle for a key when creating the
ActionError object? This would allow you to have messages from various bundles
within the ActionErrors collection.

Chuck

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Craig McClanahan added a comment - 09/Aug/02 07:29 AM
The ability to create ActionError instances that pull their messages from
different resource bundles will be addressed in a version of Struts after 1.1.

Ted Husted added a comment - 20/Jan/03 04:03 AM
Marking all current RESOLUTION LATER issues to be against the Nightly Build.

A Stephen added a comment - 21/Feb/03 09:43 PM
Created an attachment (id=4967)
proposed patch, so that syntax is consistent with the way forms work for multiple modules

A Stephen added a comment - 21/Feb/03 09:58 PM
Created an attachment (id=4968)
explaination of the problem, with the syntax after the patch

A Stephen added a comment - 21/Feb/03 10:07 PM
Attachment # 4967 as the proposed patch
Attachment # 4968 contains code snippets, before and after the proposed patch



A Stephen added a comment - 10/Mar/03 07:13 AM
proposed patch, so that syntax is consistent with the way forms work for
multiple modules

Ted Husted added a comment - 16/Mar/03 11:06 PM
Marking this for the 1.2 family.

Don Brown added a comment - 26/Apr/05 08:46 AM
This seems like a sensible patch. Any objections to applying it?

Niall Pemberton added a comment - 12/May/05 03:20 PM
The patches don't relate to the original requested enhancement - they resolve a
different issue that was fixed in RequestUtils on 16th July 2003 for STR-798.
They're also out of date, since the code in question has moved to TagUtils.

Don Brown added a comment - 19/Jun/05 02:12 PM
Hmm...the easiest solution for this would be to add set/set bundle methods to
ActionMessage. It would require two steps when creating a message, but the
alternative is to define some sort of convention for keys which lets you specify
the bundle like "bundle:messageKey" where "bundle" is the key for the message
bundle and the key is "messageKey". This allows simpler message creation, but
can potentially affect backwards-compatibility.

Don Brown added a comment - 12/Dec/05 04:52 AM


*** This bug has been marked as a duplicate of 37713 ***