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

Liferay Faces Bridge does not support adding PrimeFaces 5.x scripts before the closing </body> tag of the portal page

    Details

      Description

      This issue was actually fixed in the master branch (and backported to other branches) as part of FACES-1977. However, the patch jar for that issue did not include the fix for adding scripts before the closing </body> tag. So this issue serves as a task for developing a patch jar that implementing support for adding scripts before the closing </body> tag.

      Steps to reproduce:

      1. In any PrimeFaces 5.0/5.1 portlet, create a view scoped bean, and place these two lines in the constructor for the view scoped bean:

              RequestContext requestContext = RequestContext.getCurrentInstance();
              requestContext.getScriptsToExecute().add("alert('script from view scoped FooBean');");
      

      2. Deploy the portlet

      3. add the attached patch jar to the WEB-INF/lib directory of the deployed portlet

      4. Add the portlet to a portal page

      5. Reload/view the portlet page (which contains an EL reference to the view scoped bean from step 1) in the browser

      If the bug is fixed, then an alert will popup in the browser, and the view source will only have one </body> tag.
      Otherwise, the bug still exists. If you are getting the pop-up, but have more than one </body> tag in the view source, then the FACES-2056 patch jar was not applied.

      NOTE: the patch for FACES-1977 does not need to be used with this patch. If you are only using the FACES-1977 patch, then you will not have multiple </body> tags, but you will not get the pop-up. Use the patch for this issue FACES-2056 instead of the patch for FACES-1977.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  liferay-faces-3.1.5-ga6
                  liferay-faces-3.2.5-ga6
                  liferay-faces-4.2.5-ga6