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

Parameter name clash causes action parameters to be inaccessible


    • 4


      Problem Background:

      When there is a name clash with a private render parameter on a javax.portlet.ActionURL (submitted via <form action="${actionURL}">) and an action parameter (submitted via an <input> form field), the action parameter is not accessible via ActionRequest.getActionParameters().

      Requirements for this scenario are not covered in the Portlet 3.0 Specification document. In addition, requirements are not found in the Javadoc for javax.portlet.BaseURL. Finally, the use-case is not covered by the Portlet 3.0 TCK.

      Steps to Reproduce:

      1. Deploy the attached portlet onto Liferay
      2. Add "V3 Parameter Test Portlet" to a page
      3. Enable "Single Value"
      4. Input Parameter Name: p1
      5. Input Parameter Value: v1
      6. Send
      7. Assert render parameters display in "Currently set render parameters"
      8. Enable "Single Value"
      9. Enable checkbox "remove parameter"
      10. Input Parameter Name: p1
      11. Input Parameter Value: v1
      12. Send

      Expected Result:
      Parameter p1,v1 is removed.

      Actual Result:
      No parameters are removed.

      The processAction method is running "getActionParameters()", but this is only returning the text values, not the remType or setType (these are null). The portlet will assume default values when they are not defined.

      This portlet is working as expected when deployed on Apache Pluto.

      Form is defined here: https://github.com/apache/portals-pluto/blob/e40641687ef7b88a950f9d36fa58ad447cc62d9e/demo/v3-demo-portlet/src/main/webapp/WEB-INF/jsp/view-ptp.jsp#L57
      Portlet method is here: https://github.com/apache/portals-pluto/blob/e40641687ef7b88a950f9d36fa58ad447cc62d9e/demo/v3-demo-portlet/src/main/java/org/apache/portals/pluto/demo/v3/ParamTestPortlet.java#L127

      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




            dante.wang Dante Wang
            victor.ware Victor Ware
            Rafaela Nascimento Rafaela Nascimento
            0 Vote for this issue
            0 Start watching this issue


              1 year, 51 weeks, 4 days ago


                Version Package