New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource localization is too rigid and forces undesirable duplication #548
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-548 http://java.net/jira/browse/JAVASERVERFACES-2348
Consider this situation, which is not uncommon. I need a JavaScript library for all locales I need images that vary by locale This feature is referred to as "additional check" for discussion in SECTION: Modified FilesM requestProcessingLifecycle.fm
M jsf-api/src/main/java/javax/faces/application/ResourceHandler.java
M jsf-api/src/main/java/javax/faces/application/Resource.java
JSF 2.0 should have specified the "loc" query parameter, but it did M jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java
M jsf-ri/src/main/java/com/sun/faces/application/resource/ClientResourceInfo.java
M jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceInfo.java
M jsf-ri/src/main/java/com/sun/faces/application/resource/FaceletResourceHelper.jav
M jsf-ri/src/main/java/com/sun/faces/application/resource/LibraryInfo.java
M jsf-ri/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java
M jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceHelper.java
Because this method is called from both WebappResourceHelper and M jsf-ri/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java
M jsf-ri/systest-per-webapp/resource-locale-prefix/src/java/com/sun/faces/systest/ResourceLocalePrefixTestCase.java
|
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Consider this situation, which is not uncommon.
Resource handling, as described in section 2.6, makes it impossible to vary the
images by locale without also unnecessary duplicating the JavaScript.
In order to have images vary by locale, it is necessary to add keys
javax.faces.resource.localePrefix into the the application's message bundle for
each locale. Once that has been done, the prefix is used for ALL resource lookups.
JavaScript libraries under the locale prefix for each locale)
component library. If the locale prefix is also prepended in that case, it is
possible (even likely) that the library will break.
Suggested fix: Abolish the javax.faces.resource.localePrefix approach. Instead,
get the actual application locale, and look for resources at
language_country_variant, language_country, language, and no prefix, just like a
ResourceBundle does.
Environment
Operating System: All
Platform: All
Affected Versions
[2.0]
The text was updated successfully, but these errors were encountered: