<< Back to previous view

[JAVASERVERFACES_SPEC_PUBLIC-345] Support for custom resource bundle loading implementation Created: 26/Mar/08  Updated: 24/Jan/14

Status: Reopened
Project: javaserverfaces-spec-public
Component/s: Configuration/Bootstrapping
Affects Version/s: 2.0
Fix Version/s: 2.3

Type: Improvement Priority: Major
Reporter: syvalta Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 345
Status Whiteboard:

EGEasy5 cat2 frame size_small importance_medium

Tags:
Participants: Ed Burns, pmuir, rdelaplante, rogerk and syvalta

 Description   

Java 6 supports custom resource bundle loading implementations. It would be nice
to have similar support for JSF, so that messages could be easily loaded for
example from database instead of property files in classpath.



 Comments   
Comment by rogerk [ 22/Aug/08 09:06 AM ]

Status Whiteboard

Comment by pmuir [ 24/Aug/08 10:24 AM ]

Roger, I think this got put in the wrong pile.

I don't think we need any changes here - JSF already supports loading a custom
resource bundle through faces-config.xml (you can point this at a class OR at a
path to a properties file). Thats all you need to provide a custom Java6
resource bundle.

Comment by pmuir [ 24/Aug/08 10:25 AM ]

Change to WORKSFORME.

Comment by syvalta [ 25/Aug/08 12:49 AM ]

Ok, lets have an example. I have 10 resource bundles in custom XML format. To be
able to use them, I need to provide a Java class for every one of them. Instead,
if I could define a custom resource provider, it could load the files. Hope this
clarifies this issue.

The second issue is that xml property file format is not currently supported.
Could it be supported in JSF 2.0? (is this a spec or implementation issue?)

Comment by pmuir [ 25/Aug/08 02:36 AM ]

To clarify, the user is looking for a way to specify the ResourceBundle.Control
object, I think from the <f:loadBundle /> tag.

I would suggest opening a second issue for your second RFE as it's a separate issue.

Comment by syvalta [ 25/Aug/08 10:45 PM ]

Yes, exactly, and also for <resource-bundle>(/<message-bundle>) in
faces-config.xml. Sorry for inaccuracy.

Comment by Ed Burns [ 23/Sep/08 11:52 AM ]

target 2.0

Comment by rdelaplante [ 27/Oct/08 02:26 PM ]

I have created a system for loading facelet templates from theme directories on
the filesystem (not in a .jar on classpath). The resource bundles (messages in
.properties files) live in the theme directories. I am unable to use
faces-config.xml to statically define resource bundles for themes since they are
discovered at runtime. Being able to specify a ResourceBundle.Control in
f:loadMessages may help, but I would prefer to have an addResourceBundle to the
Application object in FacesContext. Let me specify a name for EL, and provide
the ResourceBundle.Control. There might be other method signatures people find
useful, such as providing an instance of ResourceBundle instead of
ResourceBundle.Control.

Comment by rdelaplante [ 27/Oct/08 03:13 PM ]

Added self to CC list

Comment by syvalta [ 26/Mar/09 01:46 AM ]

Just for reference, the xml property file format issue is tracked at
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=452

Comment by Ed Burns [ 24/Sep/09 08:35 AM ]

Move to 2.1

Comment by Ed Burns [ 24/Nov/09 07:48 AM ]

Prepare to delete "spec" subcomponent.

Comment by Ed Burns [ 14/Dec/09 08:59 AM ]

Move these to unscheduled because we need to target them correctly. 2.next isn't
specific enough.

Comment by rogerk [ 05/Mar/10 07:21 AM ]

cat2

Comment by Ed Burns [ 22/Mar/10 10:44 AM ]

frame

Comment by Ed Burns [ 15/May/10 07:54 AM ]

These are targeted at 2.1.

Comment by Ed Burns [ 08/Jun/10 02:14 PM ]

triage

Comment by rogerk [ 27/Oct/10 11:00 AM ]

triage

Generated at Fri Apr 18 13:37:59 UTC 2014 using JIRA 4.0.2#472.