Issue Details (XML | Word | Printable)

Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: grunt2000
Votes: 0
Watchers: 0

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

Give the ability to change the scope of <f:loadBundle> to ease its use in composites.

Created: 26/Sep/10 08:22 AM   Updated: 17/Dec/13 03:39 PM   Resolved: 17/Dec/13 03:39 PM
Component/s: Components/Renderers
Affects Version/s: 2.0
Fix Version/s: 2.2

Time Tracking:
Not Specified


Operating System: All
Platform: All

Issuezilla Id: 890
Status Whiteboard:

size_medium importance_small

Participants: Ed Burns, grunt2000 and rogerk

 Description  « Hide

When you have a page using these composites:

and that these composites use a resource bundle by the mean of <f:loadBundle>
for their own work, you have to take care of using a unique variable for each of

If you attempt to ease your coding by using the same variable each time in all
your composites, such as here (using x):
<html xmlns="" [...]>

<f:loadBundle basename="myWork_a" var="x" />

Then <myTools:a/>, <myTools:b/>, and <myTools:c/> will use the same bundle,
whatever their own basename is saying. (I don't remember if only the basename of
the myWork_a bundle will be used or only myWork_c).

Then, we have to find unique variables one to ensure our composite won't have
bundle variables that could collide. Like:
<f:loadBundle basename="myWork_a" var="xa" /> for component a,
<f:loadBundle basename="myWork_b" var="xb" /> for component b,
<f:loadBundle basename="myWork_c" var="xc" /> for component c.

and of course, it's a bit boring. The problem comes from <f:loadBundle> that has
a request scope, I think. Can something be done to allow it having only the
strict composite scope (= no scope at all?).



rogerk added a comment - 27/Oct/10 02:38 PM


rogerk added a comment - 16/Nov/10 01:03 PM


Ed Burns added a comment - 17/Dec/13 03:39 PM

<f:loadBundle> is not the recommended way to perform I18N in JSF. Instead, use application level config in the faces-config.xml.