Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-84479

HeaderResponse.addDependency() does not preserve the order in which dependences are added

    Details

      Description

      Background

      The implementation of HeaderResponse.addDependency() does not preserve the order in which dependences are added.

      Section 15.8.1 of the Portlet 3.0 Specification titled "Page Resources and Dependencies" states:

      Page resources can have dependencies among themselves, and can require loading in a particular order. A comprehensive solution to this problem is beyond the scope of this specification and is left to the portal implementation. However, where possible, the portal implementation should attempt to load the page resources in the order they are declared by the portlet. Statically declared page resource dependencies should be loaded before dynamically
      declared dependencies.

      Steps to Reproduce

      • Download the attached com.liferay.test.lps84479.portlet-1.0.0.war artifact and copy it to $LIFERAY_HOME/deploy
      • Open the browser's javascript console
      • Reload the page in the browser

      Expected Results

      The browser's javascript console contains the following in alphabetical order:

      • dependencyA
      • dependencyB
      • dependencyC
      • dependencyD
      • dependencyE
      • dependencyF

      Actual Results

      The browser's javascript console contains the aforementioned output but not in alphabetical order.

        Attachments

          Activity

            People

            • Assignee:
              raven.song Raven Song
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 5 days ago

                Packages

                Version Package
                7.1.10 DXP FP2
                7.1.1 CE GA2
                7.1.10.1 SP1
                7.1.X
                Master