Author: ndkhoiits
Date: 2011-05-24 04:56:02 -0400 (Tue, 24 May 2011)
New Revision: 6533
Modified:
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java
Log:
GTNPORTAL-1834 Portlet's context-root cannot contain slashes
Modified:
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2011-05-23
21:21:55 UTC (rev 6532)
+++
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2011-05-24
08:56:02 UTC (rev 6533)
@@ -126,9 +126,9 @@
@Override
public PortletContext getProducerOfferedPortletContext(String applicationState)
{
- String[] chunks = Utils.split("/", applicationState);
- String appName = chunks[0];
- String portletName = chunks[1];
+ int indexOfSeparator = applicationState.lastIndexOf("/");
+ String appName = applicationState.substring(0, indexOfSeparator);
+ String portletName = applicationState.substring(indexOfSeparator + 1);
return PortletContext.reference(PortletInvoker.LOCAL_PORTLET_INVOKER_ID,
PortletContext.createPortletContext(appName, portletName));
}
Show replies by date