Author: ndkhoiits
Date: 2010-09-16 05:54:53 -0400 (Thu, 16 Sep 2010)
New Revision: 4222
Modified:
portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
Log:
GTNPORTAL-1480 Encode new node URI before redirect to them in tab dashboard
Modified:
portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
---
portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-09-16
07:12:48 UTC (rev 4221)
+++
portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-09-16
09:54:53 UTC (rev 4222)
@@ -40,6 +40,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
@@ -419,7 +420,7 @@
PortalRequestContext prContext = Util.getPortalRequestContext();
prContext.setResponseComplete(true);
- prContext.getResponse().sendRedirect(prContext.getPortalURI() +
selectedNode.getUri());
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
URLEncoder.encode(selectedNode.getUri(), "UTF-8"));
}
}
}
@@ -437,7 +438,7 @@
//We should redirect to current node while adding new tab fails
PageNode currentNode = tabPane.uiPortal.getSelectedNode();
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getResponse().sendRedirect(prContext.getPortalURI() +
currentNode.getUri());
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
URLEncoder.encode(currentNode.getUri(), "UTF-8"));
Object[] args = {newTabLabel};
context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
@@ -450,7 +451,7 @@
{
PortalRequestContext prContext = Util.getPortalRequestContext();
prContext.setResponseComplete(true);
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + uri);
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
URLEncoder.encode(uri, "UTF-8"));
}
}
}
@@ -475,11 +476,10 @@
String newTabLabel = context.getRequestParameter(RENAMED_TAB_LABEL_PARAMETER);
if (!tabPane.validateName(newTabLabel))
{
- //TODO nguyenanhkien2a(a)gmail.com
//We should redirect to current node while renaming fails
PageNode currentNode = tabPane.uiPortal.getSelectedNode();
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getResponse().sendRedirect(prContext.getPortalURI() +
currentNode.getUri());
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
URLEncoder.encode(currentNode.getUri(), "UTF-8"));
Object[] args = {newTabLabel};
context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
@@ -491,7 +491,7 @@
if (newUri != null)
{
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + newUri);
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
URLEncoder.encode(newUri, "UTF-8"));
}
}
}
Show replies by date