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

JavaScript resources not loading for JSF portlets embedded in Liferay theme or Liferay layout template

    Details

      Description

      This issue was first reported in the forums here:
      http://www.liferay.com/community/forums/-/message_boards/message/13290294
      I think maybe the best way to understand the problem, is to take a look at a typical Liferay theme portal_normal.vm Velocity Template:
      ...
      <head>
      <title>$the_title - $company_name</title>
      $theme.include($top_head_include)
      </head>
      <body>
      ...
      <div id="content">
      ...
      $theme.runtime("1_WAR_jsf2portlet_INSTANCE_a000")
      ...
      </div>
      </body>
      In a normal portlet scenario, all of the portlets undergo the portlet lifecycle prior to this Velocity template getting run. But because the "runtime" portlet is added dynamically via Velocity, the portlet lifecycle for the runtime portlet isn't run until AFTER the $top_head_include (top_head.jsp) is executed. And that's the JSP that refers to the WebKeys.PAGE_TOP request attribute for adding resources to the <head> section of the portal page.
      So the problem isn't with liferay-faces-bridge, it's actually an incompatibility between $theme.runtime() and the <liferay-util:html-top /> tag, which utilizes WebKeys.PAGE_TOP for adding resources to the <head> section of the portal page.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-3.1.0-ga1