Uploaded image for project: 'PUBLIC - Liferay IDE'
  1. PUBLIC - Liferay IDE
  2. IDE-1447

Code Template update for lr-themedisplay

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Labels:
      None
    • Environment:
      Developer Studio 2.0.0.201401241136-b1

      Description

      Developer Studio contains the Java Template lr-themedisplay with this implementation

      ThemeDisplay ${themeDisplay} = (ThemeDisplay) ${request:var(javax.portlet.PortletRequest)}.getAttribute(WebKeys.THEME_DISPLAY);
      
      long groupId = themeDisplay.getScopeGroupId();
      
      // now read your parameters, e.g. like this: 
      // long someParameter = ParamUtil.getLong(request, "someParameter");
      ${cursor}
      
      ${:import(com.liferay.portal.theme.ThemeDisplay,com.liferay.portal.kernel.util.WebKeys,com.liferay.portal.kernel.util.ParamUtil)}

      There's one "themeDisplay" macro missing (e.g. hard coded name "themeDisplay"), so the implementation should be updated like this:

      ThemeDisplay ${themeDisplay} = (ThemeDisplay) ${request:var(javax.portlet.PortletRequest)}.getAttribute(WebKeys.THEME_DISPLAY);
      
      long groupId = ${themeDisplay}.getScopeGroupId();
      
      // now read your parameters, e.g. like this: 
      // long someParameter = ParamUtil.getLong(request, "someParameter");
      ${cursor}
      
      ${:import(com.liferay.portal.theme.ThemeDisplay,com.liferay.portal.kernel.util.WebKeys,com.liferay.portal.kernel.util.ParamUtil)}

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 41 weeks, 1 day ago

                Packages

                Version Package
                2.1.0