Uploaded image for project: 'Seam International'
  1. Seam International
  2. SEAMINTL-25

AvailableLocales.locales always has zero elements when configuration follows the documentation

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.0.Beta2
    • Fix Version/s: 3.0.0.CR1
    • Component/s: Locales
    • Labels:
      None
    • Environment:
      JBAS6.0.0.Final

      Description

      AvailableLocales has @Produces List<Locale> locales, but the list is always empty

      Stepping through the code in debug mode shows that no locales is added because the if-test of line 55 (!supportedLocaleKeys.isUnsatisfied()) is never true

      (and a side note: the log says "WELD-000604 interface org.jboss.seam.international.locale.SupportedLocaleKeys is not declared @Target(METHOD, FIELD, PARAMETER, TYPE). Weld will use this annotation, however this may make the application unportable." otherwise nothing in the logs)

        Gliffy Diagrams

          Activity

          Hide
          lelleh Leiv Hellebo added a comment -

          simple app with one class that exposes the locales
          simply deploy and navigate to localhost:8080/seamintl-nolocales

          Show
          lelleh Leiv Hellebo added a comment - simple app with one class that exposes the locales simply deploy and navigate to localhost:8080/seamintl-nolocales
          Hide
          lelleh Leiv Hellebo added a comment -

          attaching the class that exposes the locales

          Show
          lelleh Leiv Hellebo added a comment - attaching the class that exposes the locales
          Hide
          ssachtleben Sebastian Sachtleben added a comment -

          Several problems solved. First the configuration wasnt properly parsed. The Config module took the Instance and not as List directly. It wasnt possible to set up more than one locale. Currently I'm not sure if one worked before. I have added a new configuration class with a set of locale which parsed perfectly from seam-beans.xml now.

          In AvailableLocals.java the init method failed allways on !supportedLocaleKeys.isUnsatisfied() before. Now with the configuration the problem is solved and the list of locales will be proved correctly.

          I have also changed the test and docbook to complete this bugfix.

          Show
          ssachtleben Sebastian Sachtleben added a comment - Several problems solved. First the configuration wasnt properly parsed. The Config module took the Instance and not as List directly. It wasnt possible to set up more than one locale. Currently I'm not sure if one worked before. I have added a new configuration class with a set of locale which parsed perfectly from seam-beans.xml now. In AvailableLocals.java the init method failed allways on !supportedLocaleKeys.isUnsatisfied() before. Now with the configuration the problem is solved and the list of locales will be proved correctly. I have also changed the test and docbook to complete this bugfix.
          Hide
          ssachtleben Sebastian Sachtleben added a comment -

          Ok I have tested with another webapp and the bug is fixed in current snapshot.

          Just change the seam-beans.xml to:

          <beans xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:s="urn:java:ee"
          xmlns:lc="urn:java:org.jboss.seam.international.locale"
          xsi:schemaLocation="
          http://java.sun.com/xml/ns/javaee
          http://docs.jboss.org/cdi/beans_1_0.xsd">

          <lc:LocaleConfiguration>
          <lc:supportedLocaleKeys>
          <s:value>en</s:value>
          <s:value>fr</s:value>
          </lc:supportedLocaleKeys>
          </lc:LocaleConfiguration>

          </beans>

          Show
          ssachtleben Sebastian Sachtleben added a comment - Ok I have tested with another webapp and the bug is fixed in current snapshot. Just change the seam-beans.xml to: <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="urn:java:ee" xmlns:lc="urn:java:org.jboss.seam.international.locale" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd "> <lc:LocaleConfiguration> <lc:supportedLocaleKeys> <s:value>en</s:value> <s:value>fr</s:value> </lc:supportedLocaleKeys> </lc:LocaleConfiguration> </beans>

            People

            • Assignee:
              kenfinni Ken Finnigan
              Reporter:
              lelleh Leiv Hellebo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development