Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.5.0
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:jdk 1.4
liferay pro 3.5
-
Similar Issues:
Description
It seems that when I create a PortletURL and set a parameter, then use .toString to display this url for use, the parameter is set.
However, if i use the same url object, and set the parameter to another value, instead of changing the existing value, it creates another parameter in the list.
e.g. parameter method
PortletURL url = null;
url = response.createRenderURL();
System.out.println("DAVViewingPortlet.addNavigation : url : " + url.toString( ) );
url.setParameter( "method", "CreateCollection" );
System.out.println("DAVViewingPortlet.addNavigation : url : " + url.toString( ) );
url.setParameter( "method", "UploadFile" );
System.out.println("DAVViewingPortlet.addNavigation : url : " + url.toString( ) );
DAVViewingPortlet.addNavigation : url : http://127.0.0.1:8080/c/portal/layout?p_l_id=1&p_p_id=davviewing_WAR_davviewing&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_width=536&p_p_col_order=w1&p_p_col_pos=0&p_p_col_count=1&#p_davviewing_WAR_davviewing
DAVViewingPortlet.addNavigation : url : http://127.0.0.1:8080/c/portal/layout?p_l_id=1&p_p_id=davviewing_WAR_davviewing&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_width=536&p_p_col_order=w1&p_p_col_pos=0&p_p_col_count=1&_davviewing_WAR_davviewing_method=Home&_davviewing_WAR_davviewing_method=CreateCollection&#p_davviewing_WAR_davviewing
DAVViewingPortlet.addNavigation : url : http://127.0.0.1:8080/c/portal/layout?p_l_id=1&p_p_id=davviewing_WAR_davviewing&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_width=536&p_p_col_order=w1&p_p_col_pos=0&p_p_col_count=1&_davviewing_WAR_davviewing_method=Home&_davviewing_WAR_davviewing_method=CreateCollection&_davviewing_WAR_davviewing_method=UploadFile&#p_davviewing_WAR_davviewing
D
The last url has two method parameters set to diferent values.
Cheers
Paul.

Also when trying to extract the parameter, the value is sometimes extractable, sometimes not.
Weird!