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

Portlets that define window state support will not have a Maximized or Minimized states by default

    Details

    • Fix Priority:
      3

      Description

      Steps to Reproduce:

      1. Deploy attached demo portlet to Liferay
      2. Add "Portlet Config Portlet" to a page
      3. View list of "Window States" in the portlet

      Expected Result:
      All default Portlet window states are present.

      Actual Result:
      The follow output is missing:

      MIME type: text/html, WindowState: maximized, Allowed: true
      MIME type: text/html, WindowState: minimized, Allowed: true
      

      The portlet.xml defines:

            <supports>
               <mime-type>text/html</mime-type>
               <portlet-mode>VIEW</portlet-mode>
               <portlet-mode>HELP</portlet-mode>
               <portlet-mode>EDIT</portlet-mode>
               <portlet-mode>MyMode_nonPortalManaged_1</portlet-mode>
               <portlet-mode>MyMode_nonPortalManaged_2</portlet-mode>
               <portlet-mode>MyMode_PortalManaged_3</portlet-mode>
               <window-state>TestWindowState_1</window-state>
               <window-state>TestWindowState_2</window-state>
            </supports>
      

      While MAXIMIZED and MINIMIZED are not defined in the support list, they should still be available per the Portlet 3 specificiation 10.5:

      As all portlets must at least support the pre-defined window states NORMAL, MAXIMIZED,
      MINIMIZED, these window states do not have to be explicitly configured. 
      

      Liferay's implementation only adds NORMAL if the portlet defines its own states.
      https://github.com/liferay/liferay-portal/blob/90228d34feb5e555a82fe32142ac1ba634a38487/portal-impl/src/com/liferay/portal/service/impl/PortletLocalServiceImpl.java#L2120-L2141

      Demo Portlet can be manually built by:

      1. git clone https://github.com/apache/portals-pluto
      2. cd portals-pluto/demo/v3-demo-portlet
      3. mvn -P all,liferay clean install
      4. cp target/*.war LIFERAY_HOME/deploy

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              victor.ware Victor Ware
              Participants of an Issue:
              Recent user:
              Victor Ware
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                5 weeks, 3 days ago