ICEfaces
  1. ICEfaces
  2. ICE-7410

The Locale is not updated dynamically in Component Showcase when running on MyFaces 2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      MyFaces 2 Component Showcase
    • Assignee Priority:
      P2
    • Affects:
      Sample App./Tutorial

      Description

      When running the compat Component Showcase, the pull down menu for choosing a language does not work when running on MyFaces 2. The problem is related to the issue reported in ICE-7236 found during regression testing. Basically the f:loadBundle tag was not designed to work with Ajax requests and MyFaces appears to be more strict about this than Mojarra. The solution is to apply the application-level changes outlined in the other case:

      - remove the f:loadBundle tag
      - wrap the markup in <f:view locale="#{testBean.locale}"> so that the locale is set right at the view level
      - set the locale in the appropriate place via

          FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(locale));

      - add something similar to the following to the faces-config.xml file:

              <resource-bundle>
                  <base-name>org.icefaces.application.showcase.view.resources.messages</base-name>
                  <var>msgs</var>
              </resource-bundle>

        Activity

        Hide
        Deryk Sinotte added a comment -

        Assigned to Deryk

        Show
        Deryk Sinotte added a comment - Assigned to Deryk
        Hide
        Deryk Sinotte added a comment -

        I've checked in the required modifications to the Component Showcase app so that the locale can be updated dynamically.

        Show
        Deryk Sinotte added a comment - I've checked in the required modifications to the Component Showcase app so that the locale can be updated dynamically.

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: