ICEfaces
  1. ICEfaces
  2. ICE-2763

Add new ice:loadBundle component (locale of messages bundle cannot be changed dynamically)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8DR#2, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Since <f:loadBundle> will cache the resource properties, changing the locale of the UIViewRoot dynamically does not cause the messages to update because the resource bundle is not reloaded. In order to reload the resource bundle, need to refresh the page or use redirect, but this causes a new UIViewRoot to be created and it will use the config and browser settings to determine the locale and load the bundle before the backing bean can set the locale of the ViewRoot.

      Need a custom loadBundle that will prevent the bundle from caching and allow messages bundle to dynamically change when the locale is changed

        Issue Links

          Activity

          Hide
          Krashan Brahmanjara added a comment -

          Locale with <resource-bundle> works well.

          I think that this new feature will start a new set of problems for not advanced users.

          Show
          Krashan Brahmanjara added a comment - Locale with <resource-bundle> works well. I think that this new feature will start a new set of problems for not advanced users.
          Hide
          Ken Fyten added a comment -

          The new ice:loadBundle component added to the trunk. Its provides two dynamic features:

          1- the message bundle base can be changed dynamically. (So you can change entire messages bundle)
          2- if the "locale" has changed on ViewRoot dynamically, it reloads the bundle for the corresponding locale.

          Feature "1" is working fine, but feature "2" is not working due to the fact that we use the same ViewRoot on each request for the same page and in the D2DViewHandler there is a call "setLocale" on viewRoot which cache the locale into the viewRoot, so the getViewRoot always returns the cached locale and doesn't respect the value binding. This is captured in ICE-3755.

          Show
          Ken Fyten added a comment - The new ice:loadBundle component added to the trunk. Its provides two dynamic features: 1- the message bundle base can be changed dynamically. (So you can change entire messages bundle) 2- if the "locale" has changed on ViewRoot dynamically, it reloads the bundle for the corresponding locale. Feature "1" is working fine, but feature "2" is not working due to the fact that we use the same ViewRoot on each request for the same page and in the D2DViewHandler there is a call "setLocale" on viewRoot which cache the locale into the viewRoot, so the getViewRoot always returns the cached locale and doesn't respect the value binding. This is captured in ICE-3755.
          Hide
          Adnan Durrani added a comment -

          demo added

          Show
          Adnan Durrani added a comment - demo added
          Hide
          Adnan Durrani added a comment -

          Not working with JSF 1.1

          Show
          Adnan Durrani added a comment - Not working with JSF 1.1
          Hide
          Adnan Durrani added a comment -

          support added for JSF 1.1
          trunk revision 17918

          Show
          Adnan Durrani added a comment - support added for JSF 1.1 trunk revision 17918

            People

            • Assignee:
              Unassigned
              Reporter:
              Jacky Lee
            • Votes:
              14 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: