Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1674

Resource libraries/collections are not marked as being added to the <head>...</head> section of the portal page

    Details

      Description

      Overview

      RichFaces has a concept called a ResourceLibrary which is a collection of individual resources. For example, according to AjaxResourceLibrary.java, the "org.richfaces:ajax.reslib" resource id refers to a collection of resources such as "jsf.js", "jquery.js", and "richfaces.js"

      Currently the bridge's HeadRendererBridgeImpl class assumes a 1::1 mapping between resource and URL. But in the case of a RichFaces ResourceLibrary, it is actually a 1::Many relationship. Because of this, the bridge is not remembering that resources like jquery.js are present in the <head>...<head> section of the portal page, and loads them again after navigating to a different JSF view (via Ajax).

      Steps to Reproduce:

      1. Deploy the richfaces4-portlet

      2. Create a new portal page named "RICH4"

      3. Add the "RichFaces4 Portlet" to the "RICH4" page

      4. Reload the "RICH4" page

      5. Complete the job applicant form and click "Submit"

      6. Click "Submit Another"

      If the bug still exists, then you will see a JavaScript console error:

      Uncaught SyntaxError: Unexpected token <

      NOTE: This happens with RichFaces 4.2.0.Final and 4.3.2.Final so it is unrelated to the upgrade performed in FACES-1530. Also, it happens with and without the fix for FACES-1532 so it seems unrelated to that as well.

        Attachments

          Activity

            People

            • Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-3.0.3-legacy-ga4
                liferay-faces-3.0.3-ga4
                liferay-faces-3.1.3-ga4