Tiles
  1. Tiles
  2. TILES-365

Test webapp "testimportattribute_inherit.jsp" test fails

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.3
    • Component/s: tiles-core
    • Labels:
      None

      Description

      The "testimportattribute_inherit.jsp" fails, because it displays:

      • valueOne
      • valueTwo
      • valueThree
      • valueOne
      • valueTwo
      • valueThree
      • valueOne
      • valueTwo
      • valueThree
      • valueFour

      Instead of:

      • valueOne
      • valueTwo
      • valueThree
      • valueFour

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          23h 32m 1 Antonio Petrelli 13/Feb/09 12:26
          Jeff Turner made changes -
          Project Import Mon Feb 01 01:30:28 UTC 2010 [ 1264987828110 ]
          Hide
          Lukasz Racon added a comment -

          Antonio,
          while fixing this one I think that you have reintroduced TILES-340 - parent definitions do not have inheritance and wildcards resolved.

          Revision 743737 changed this line:
          protected Map<String, Definition> loadParentDefinitions(Locale parentLocale)

          { - return loadRawDefinitionsFromURLs(parentLocale); + return loadDefinitionsFromURLs(parentLocale); }

          After deploying the application if the first user's locale is set to 'en_US' the ResolvingLocaleUrlDefinitionDAO loads 'null' then 'en' definitions, then it loads 'en_US' definitions.

          ResolvingLocaleUrlDefinitionDAO.postDefinitionLoadOperations is called only for the 'en_US' definitions, while parent ('null' and 'en') locale definitions are never resolved (inheritance and wildcards). If next user has 'en' locale s/he gets NoSuchDefinitionException.

          Show
          Lukasz Racon added a comment - Antonio, while fixing this one I think that you have reintroduced TILES-340 - parent definitions do not have inheritance and wildcards resolved. Revision 743737 changed this line: protected Map<String, Definition> loadParentDefinitions(Locale parentLocale) { - return loadRawDefinitionsFromURLs(parentLocale); + return loadDefinitionsFromURLs(parentLocale); } After deploying the application if the first user's locale is set to 'en_US' the ResolvingLocaleUrlDefinitionDAO loads 'null' then 'en' definitions, then it loads 'en_US' definitions. ResolvingLocaleUrlDefinitionDAO.postDefinitionLoadOperations is called only for the 'en_US' definitions, while parent ('null' and 'en') locale definitions are never resolved (inheritance and wildcards). If next user has 'en' locale s/he gets NoSuchDefinitionException.
          Antonio Petrelli made changes -
          Link This issue is duplicated by TILES-417 [ TILES-417 ]
          Antonio Petrelli made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hide
          Antonio Petrelli added a comment -

          Now the list attributes are inherited only once.

          Show
          Antonio Petrelli added a comment - Now the list attributes are inherited only once.
          Antonio Petrelli made changes -
          Field Original Value New Value
          Component/s tiles-test [ 21322 ]
          Component/s tiles-jsp (jsp support) [ 21330 ]
          Hide
          Antonio Petrelli added a comment -

          The problem is in CachingLocaleUrlDefinitionDAO and ResolvingLocaleUrlDefinitionDAO.
          In particular, in the latter one, the definitions are loaded and immediately resolved (speaking of definition inheritance).
          In case of multiple locale, the URLs are loaded (grouped by locale) and then resolved starting from the "null" locale to the chosen locale.
          For example, if I have "it_IT" locale:

          • definitions of "null" locale are loaded, then resolved;
          • definitions of "it" locale are loaded, then resolved;
          • definitions of "it_IT" locale are loaded, then resolved.
            These definitions MUST be resolved only at the end, not 3 times.
          Show
          Antonio Petrelli added a comment - The problem is in CachingLocaleUrlDefinitionDAO and ResolvingLocaleUrlDefinitionDAO. In particular, in the latter one, the definitions are loaded and immediately resolved (speaking of definition inheritance). In case of multiple locale, the URLs are loaded (grouped by locale) and then resolved starting from the "null" locale to the chosen locale. For example, if I have "it_IT" locale: definitions of "null" locale are loaded, then resolved; definitions of "it" locale are loaded, then resolved; definitions of "it_IT" locale are loaded, then resolved. These definitions MUST be resolved only at the end, not 3 times.
          Antonio Petrelli created issue -

            People

            • Assignee:
              Antonio Petrelli
              Reporter:
              Antonio Petrelli
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development