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

Unable to include a portal taglib (through "taglibLiferayHash" or "PortalJspTagLibs") in a Dynamic Data Lists Display Template

    Details

      Description

      1. Create a Display Template for the "ToDo" Data Definition (DD):
        <#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] />
        
        <@liferay_ui["icon"]
            iconCssClass="icon-print"
            message="print"
            url="https://www.google.com"
        />
        
      2. Create a new Dynamic Data List (DDL) using the "ToDo" DD
      3. Add DDL Display Portlet to the Welcome page
      4. Configure portlet to use the list
      5. Configure portlet to use the Display Template we created in step 1
      6. Add a record

      Result:

      The following has evaluated to null or missing:
      ==> PortalJspTagLibs  [in template "20202#20246#30516" at line 2, column 23]
      
      ----
      Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
      ----
      
      ----
      FTL stack trace ("~" means nesting-related):
          - Failed at: #assign liferay_ui = PortalJspTagLibs...  [in template "20202#20246#30516" at line 2, column 1]
      ----
      

      This code doesn't work either:

      <#assign liferay_ui = PortalJspTagLibs["/WEB-INF/tld/liferay-ui.tld"] />
      

        Attachments

        1. Fixed.PNG
          Fixed.PNG
          23 kB
        2. Fixed62.PNG
          Fixed62.PNG
          16 kB
        3. Reproduced.PNG
          Reproduced.PNG
          64 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 33 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 CE RC1