[
https://issues.apache.org/jira/browse/MYFACES-4491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626301#comment-17626301
]
Paulo Cristovão de Araújo Silva Filho edited comment on MYFACES-4491 at
10/31/22 10:58 AM:
-------------------------------------------------------------------------------------------
Just for clarification, I've made two projects because the strategy to retrieve
the properties files may change when using the composite inside a given jsf
project or as a jar dependency - it's like that with mojarra -, so I could test
the solution in both scenarios. The strategy may change also if the project is
in production or development mode, as seen in the pull requests I've made to
mojarra (prs [5163|https://github.com/eclipse-ee4j/mojarra/pull/5163],
[5162|[https://github.com/eclipse-ee4j/mojarra/pull/5162]], and
[5161|https://github.com/eclipse-ee4j/mojarra/pull/5161]).
was (Author: pcristof):
Just for clarification, I've made two projects because the strategy to retrieve
the properties files may change when using the composite inside a given jsf
project or as a jar dependency - it's like that with mojarra -, so I could test
the solution in both scenarios. The strategy may change also if the project is
in production or development mode, as seen in the pull requests I've made to
mojarra (prs [5163|https://github.com/eclipse-ee4j/mojarra/pull/5163],
[5162|[https://github.com/eclipse-ee4j/mojarra/pull/5162|https://github.com/eclipse-ee4j/mojarra/pull/5162],]]
and [5161|https://github.com/eclipse-ee4j/mojarra/pull/5161]).
> Composite component does not reflect locale changes
> ----------------------------------------------------
>
> Key: MYFACES-4491
> URL: https://issues.apache.org/jira/browse/MYFACES-4491
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.3.10, 3.0.2, 4.0.0-RC3
> Reporter: Paulo Cristovão de Araújo Silva Filho
> Priority: Major
>
> *Bug*
> According to VDL documentation
> ([2.3|https://jakarta.ee/specifications/faces/2.3/vdldoc/overview-summary.html],
> [3.0|https://jakarta.ee/specifications/faces/3.0/vdldoc/], and
> [4.0|https://jakarta.ee/specifications/faces/4.0/vdldoc/]), "_[t]he normal
> localization rules for ResourceBundle would apply_" for composite components
> localized with <composite_component_name>.properties files that uses
> {code:java}
> #{cc.resourceBundleMap}
> {code}
> . As such, when using a composite component named custom_button.xhtml and its
> associated custom_button.properties and custom_button_fr.properties, the
> change in locale definition should change the displayed messages.
> In mojarra and myfaces (2.3, 2.3-next (myfaces), 3.0 and 4.0), the expected
> behaviour does not occur ([as recognized by BalusC in
> 2013|https://stackoverflow.com/questions/18134378/how-to-localize-jsf-composite-component]).
> His proposed hack still works for MyFaces, but I couldn't use it in recent
> versions of mojarra.
> *To reproduce*
> Example projects
> [localized-components|https://github.com/cristof/localized-components] and
> [localized-web|https://github.com/cristof/localized-web] are available to
> show the issue. Please install the first one into your local maven and then
> compile the second.
> You may deploy localized-web into a tomee-plus versions 8.0.13 (jakarta8) and
> 9.0.0-MX (jakarta9) and check the behavior. Go to
> localhost:8080/localized-web and change the language.
> Expected behavior
> The button label should change reflecting the desired language, but it
> doesn't.
> Solution
> I've opened for pull requests that fixes the issue for branches
> [2.3.x|https://github.com/apache/myfaces/pull/367],
> [2.3-next|https://github.com/apache/myfaces/pull/368],
> [3.0|https://github.com/apache/myfaces/pull/366] and
> [4.0|https://github.com/apache/myfaces/pull/369].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)