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

Allow localized composite components

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.3
    • 2.0.10, 2.1.4
    • JSR-314
    • None

    Description

      I tried to make a localized composite components for dynamic localization of content on my pages (that goes beyond resource bundles). The basic idea is to be able to create composite components with static text and/or components (links, images...) for different languages. As a composite component basically is a resource I thought something like this should be possible:

      /resources/fragments/fragment01.xhtml
      /resources/de/fragments/fragment01.xhtml

      IMO the spec is a bit unclear on this but I would say it should work. I tried it - it did not work. The problem is, that CompositeComponentResourceTagHandler gets a resource in the constructor that will be used till the death of the webapp. No chance to switch locales.

      My idea is to use a cache holding a resource for every locale.

      Attachments

        1. MYFACES-3308.patch
          6 kB
          Michael Kurz
        2. MYFACES-3308.patch
          6 kB
          Michael Kurz
        3. MYFACES-3308.zip
          7 kB
          Michael Kurz

        Activity

          People

            lu4242 Leonardo Uribe
            dr.gonzo Michael Kurz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: