
| Key: |
XRP-136
|
| Type: |
New Feature
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
Minor
|
| Reporter: |
Marc Portier
|
| Votes: |
0
|
| Watchers: |
2
|
|
If you were logged in you would be able to see more operations.
|
|
xReporter
Created: 20/Aug/07 07:40 AM
Updated: 25/Sep/07 07:08 AM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
1.3
|
|
On large installations with many-many reports we see natural groups of these reports that are involved around one particular set of data or domain. More importantly these groups of reports tend to follow distinct livecycles making the joined resource-bundle management more involved then desireable.
To make this easier it would be nice if more then one set of resourcebundle files could be declared for the reports.
Already the config.xml allows to specify multiple <userbundle> elements for the different 'areas'. (See @name: report, datatype, datasource)
However
- all reports currently share the same 'report' area. (see ReportDefinion doing resourceHandle.getUserBundle("report")...)
- if multiple bundles for the same 'area' would be added to the config, the last one would overwrite any previous ones ( not tested, but looking at the code of the ResourceManagerImpl )
To resolve this we could go for either of these approaches:
[1] allow reports to specify the bundle-area-name of their preference, so it the reportDefinition asks for a different one
[2] allow in the config of the resourcemanager for multiple userbundels for the same area, making a merge rather then an overwrite of the bundles (Note however that there still would be an overwrite on the level of individual keys, so some order/fallback would need to be expressed.)
|
|
Implemented SVN rev 759.
I went for option [2].
Option [1] is more difficult, as it is not obvious in that case from where to retrieve the messages for the catalogue names, and to a lesser extend the datatypes.
So with the current implemented approach, in config.xml you can have multiple userbundles with the same name but different values for the dir and/or base-name attributes:
<userbundle name="report" dir="@conf.home@/resourcebundles" base-name="ReportMessages"/>
<userbundle name="report" dir="@conf.home@/resourcebundles" base-name="ReportMessages2"/>
Forgot to mention: as a side-effect of this change, resource bundle fallback for the user bundles now always uses the version witth locale-specific suffix, rather than the system locale.
So if a message is not found in the locale-specific bundle, e.g. MyBundle_nl.properties, it will be retrieved from MyBundle.properties, rather than MyBundle_<system-default>.properties
For the xReporter application messages, the fallback system is still Java's default.
|
|