Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2735

LocalizationSetter should add "void setLocaleFromRequest(Request)"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.8.2
    • 5.8.3
    • tapestry-core
    • None

    Description

      The LocalizationSetter is responsible for setting the correct Locale and provides an excellent extension/override point if you want to affect that, like we do in a multi-tenant/multi-language application.

      But component events fallback to the Request Locale if no other is available, which leads to wrong Locale detection in our case.
      The responsible void setLocaleFromRequest(Request) is a private method in org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl which is not correct IMO.

      I propose moving the related code to the LocalizationSetter, so all Locale-related code is in a single interface and therefore modifiable by contributing a custom one.

      Attachments

        Issue Links

          Activity

            People

              ben-ng Ben Weidig
              ben-ng Ben Weidig
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: