[PORTLETSPEC3-32] Change the parameter handling on the action URL to match the parameter handling on the render URL Created: 31/Jul/13 Updated: 29/Aug/13 Resolved: 29/Aug/13
|Component/s:||Ideas for JSR 362 Extensions|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
This addresses the differences in parameter handling on URLs created through the MimeResponse createActionURL() and createRenderURL() methods. It would be logical for the behavior to be the same for both URL types, since both are represented by a PortletURL object. Currently, the parameter handling differs in only one area - the handling of public render parameters.
A public render parameter can be set on a render URL. When the render URL is activated, the public render parameter is set to the new value, so the code in the render request will behave as follows:
However, when a parameter with the same name as a public render parameter is set on an action URL, an action parameter by that name is set on the URL. During action request processing, BOTH the action parameter value AND the public render parameter value are available under the same parameter name, so the code in the action request will behave as follows:
From the point of view of the getParameter() and getParameterValues() methods, the action URL parameter handling behavior is confusing. It seems that there might not be many use cases that would count on this behavior. In fact, a negative use case might be more common - the programmer sets a parameter on an action URL, believing that a public render parameter is being set. But in reality, the actual public render parameter ever gets set.
The proposal calls for making action URL behavior in this area to be identical to the render URL behavior.
However, it would represent a change in specified behavior as compared to JSR 286, so it needs to be considered carefully.
|Comment by andre.hagemeier [ 31/Jul/13 ]|
A colleague of mine just reported an issue, which I am pretty sure, is related to this. He set a public render parameter and during the procession of a preprocessor, he somehow retrieved two parameters with the same name.
I wonder, how you would want to adjust the action behavior to behave similar to the render behavior. In your example, would setting the prp on the action request update the prp from the renderrequest?
|Comment by msnicklous [ 01/Aug/13 ]|
Yes, that's the proposal - change the implementation so that setting a public render parameter on an action URL will result the public render parameter being set when the URL is activated.
This would require changes to the appropriate section of the spec, to the RI, and to the TCK.
|Comment by Neil Griffin [ 06/Aug/13 ]|
+1 This is the way Liferay already works
Even though some of our other PortletBox tests cover this, here is a new tester portlet that contains minimal code for testing this particular issue:
|Comment by msnicklous [ 29/Aug/13 ]|
Resolved by updating API descriptions with accompanying spec update. See: