Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.1.0 CE GA1, 7.1.X, Master
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
- Add the
LPS-84479portlet to a portal page
- 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.