Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313926 - Validation of f:loadBundle's basename attribute doesn't take localization into account
Summary: Validation of f:loadBundle's basename attribute doesn't take localization int...
Status: NEW
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: JSF Project Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-21 11:38 EDT by Preston Appel CLA
Modified: 2010-05-26 16:23 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Preston Appel CLA 2010-05-21 11:38:25 EDT
Build Identifier: M20100211-1343

I have a localized resource bundle in my "resources" package, "Greeting_en.properties", without the parent "Greeting.properties".  Referencing this resource bundle by base name like this, <f:loadBundle basename="resources.Greeting" var="g"/> results in a validation error from the Web Page Editor: "Resource bundle resources.Greeting cannot be found on classpath".

I have confirmed with both WebLogic server 10.3.3.0 and Glassfish server v3 Java EE 6 that this is permissible, so the validation is in error.

I believe the problem is that the validation in org.eclipse.jst.jsf.taglibprocessing.attributevalues.ResourceBundleType’s isValid method doesn't take localization into account.  The isValid method calls LoadBundleUtil’s getLoadBundleResource method.  This tries to confirm the existence of the specific "resources/Greeting.properties" file in either the src folder or in the project library jars.  But it doesn't look for localized versions of the file.

Reproducible: Always

Steps to Reproduce:
1.  Create a dynamic web project
2.  Create Greeting_en.properties file (but *no* Greeting.properties) file in src/resources. 
3.  Reference the base name in a JSP file as <f:loadBundle basename="resources.Greeting" var="g"/>

Expected: Passes validation/no error
Actual: Error is flagged as "Resource bundle resources.Greeting cannot be found on classpath"
Comment 1 Yury Kats CLA 2010-05-26 16:23:41 EDT
Same issue as bug 145288, I believe.