Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loading custom resource bundles

843842Jan 21 2004 — edited Mar 22 2006
Is it possible to get JSF to use a different resource resource bundle class or intercept the loading of resource bundles in some way? This may sound like a strange thing to do but I need it for two reasons:

1. My application uses a hierarchy of resource bundles to customise presentation for particular groups of users. I need to be able to select a resource bundle dynamically at runtime according to the currently authenticated user.

2. I want to place all localisable text in a database rather than property files for ease of editing in a clustered environment. I can do this by subclassing java.util.ResourceBundle but am not sure how to get JSF to use the subclass.

I was hoping to find a createResourceBundle method in the Application class that I could override but there is only a method to set the resource bundle name. (As a side issue, shouldn't all the classes in javax.faces.application really be interfaces? Or is the use of abstract classes intended to allow new methods to be added later?)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2006
Added on Jan 21 2004
9 comments
396 views