Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4491

Composite component does not reflect locale changes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.10, 3.0.2, 4.0.0-RC3
    • 2.3.11, 3.0.3, 4.0.0-RC3
    • None
    • None

    Description

      Bug

      According to VDL documentation (2.3, 3.0, and 4.0), "[t]he normal localization rules for ResourceBundle would apply" for composite components localized with <composite_component_name>.properties files that uses

      #{cc.resourceBundleMap}
      

      . 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). His proposed hack still works for MyFaces, but I couldn't use it in recent versions of mojarra.

      To reproduce

      Example projects localized-components and 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 four pull requests that fixes the issue for branches 2.3.x, 2.3-next, 3.0 and 4.0.

      Attachments

        Activity

          People

            melloware Melloware
            pcristof Paulo Cristovão de Araújo Silva Filho
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: