Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-73282 Implement Portlet 3.0
  3. LPS-85903

Portlet 3.0: Public and private render parameters that are set in the ACTION_PHASE or EVENT_PHASE must be preserved when action-url-redirect=true

    Details

      Description

      Feature Overview

      When an ActionURL is invoked for a portlet deployed to Liferay Portal, the ACTION_PHASE, EVENT_PHASE, and RENDER_PHASE execute within the scope of a single HTTP POST request. However, when the action-url-redirect option is set to true in liferay-portlet.xml, Liferay Portal will instead follow the POST-REDIRECT-GET design pattern.

      Portlet 3.0 provides the ability for the developer to set a public or private render parameter in either the ACTION_PHASE or EVENT_PHASE of the portlet lifecycle using StateAwareResponse.getRenderParameters() (MutableRenderParameters). When this occurs and action-url-redirect=true, the parameters must be present in the RenderURL that is used for redirection so that they will be available in the subsequent RENDER_PHASE.

      Steps to Verify

      • Download the attached com.liferay.test.lps85903.portlet-1.0.0.war artifact and copy to $LIFERAY_HOME/deploy
      • Add "com.liferay.test.lps85903.portlet" to a portal page
      • Reload the portal page
      • Click on the "Submit and redirect" button

      Expected Results

      The portlet renders the following:

      PASS: Redirect URL contains the myPRP1 public render parameter.
      PASS: Redirect URL contains the myPRP2 public render parameter.
      PASS: Redirect URL contains the processedAction private render parameter.
      

      Unexpected Results

      The portlet renders "FAIL" for any one of the three render parameters listed above.

        Attachments

        1. com.liferay.test.lps85903.portlet-1.0.0.war
          6 kB
          Neil Griffin

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            neil.griffin Neil Griffin
            Recent user:
            Csaba Turcsan
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 8 weeks, 6 days ago

                Packages

                Version Package
                7.1.10 DXP FP3
                7.1.1 CE GA2
                7.1.10.1 SP1
                7.1.X
                Master