[PORTLETSPEC3-10] Errata: Clarify setting parameters on Resource URLs Created: 03/May/13  Updated: 02/Aug/13  Resolved: 26/Jul/13

Status: Closed
Project: portletspec3
Component/s: JSR 286 Portlet Specification Errata
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: msnicklous Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Referring to Working Document 3 (22.04.13) Section "PLT.7.1.1 BaseURL Interface",
lines 14-16 on page 55, it is stated:

-------------------------
When creating a ResourceURL the current render parameters are
automatically added to that URL by the portlet container, but are hidden to the
getParameter calls of the portlet URL object.
-------------------------

My assumption would be that since the render parameters are hidden, they cannot be
removed. Would this be correct? Can existing render parameters on resource URLs be set?

Section "PLT.11.1.1.4 Resource Request Parameters", page 75, line 29 states the following,
so it appears that at minimum, new render parameters may be added to Resource URLs.

-------------------------
For serveResource requests the portlet must receive any resource parameters that
were explicitly set on the ResourceURL that triggered the request.
-------------------------

Since ResourceURL extends BaseURL, and since BaseURL defines get / set parameter
methods, we may need addition clarification in the description of the BaseURL class.



 Comments   
Comment by Neil Griffin [ 14/May/13 ]

My assumption would be that since the render parameters are hidden, they cannot be removed. Would this be correct?

The following causes an IllegalStateException on Pluto, even though the JavaDoc for BaseURL.setParameter(String, String) indicates that the URL parameter should be removed when null is passed:

ResourceURL.setParameter("publicRenderParam", (String) null);

Can existing render parameters on resource URLs be set?

The following is a no-op on Pluto during the RENDER_PHASE (meaning that the existing value of the Public Render Parameter is preserved in the string representation of the resource URL, instead of the overridden value of "abcd"):

ResourceURL.setParameter("publicRenderParam", "abcd");

But in the RESOURCE_PHASE, it works, meaning the string representation of the resource URL contains the overridden value of "abcd".

Comment by Neil Griffin [ 15/May/13 ]

Test Portlet: https://github.com/ngriffin7a/portletbox/tree/master/issues/PORTLETSPEC3-10-portlet

Comment by msnicklous [ 26/Jul/13 ]

reworked apidocs to clarify how parameters are set.

Comment by msnicklous [ 02/Aug/13 ]

reviewed on 20130730 and can be closed.

Generated at Tue Apr 28 06:23:00 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.