[portal-commits] JBoss Portal SVN: r13031 - in branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core: model/portal and 1 other directories.
portal-commits at lists.jboss.org
portal-commits at lists.jboss.org
Fri Mar 13 10:38:33 EDT 2009
Author: thomas.heute at jboss.com
Date: 2009-03-13 10:38:33 -0400 (Fri, 13 Mar 2009)
New Revision: 13031
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
Log:
JBEPP-45: Partial refresh and Drag and drop aren't always working correctly
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2009-03-13 13:49:31 UTC (rev 13030)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2009-03-13 14:38:33 UTC (rev 13031)
@@ -53,7 +53,7 @@
int toPosInt = Integer.parseInt(toPos);
//
- PortalObjectId tmp = PortalObjectId.parse(windowId, PortalObjectPath.LEGACY_BASE64_FORMAT);
+ PortalObjectId tmp = PortalObjectId.parse(windowId, PortalObjectPath.SAFEST_FORMAT);
//
return new MoveWindowCommand(tmp, fromPosInt, fromRegion, toPosInt, toRegion);
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-13 13:49:31 UTC (rev 13030)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-13 14:38:33 UTC (rev 13031)
@@ -562,4 +562,38 @@
}
}
};
+
+ /**
+ * Should only use a-z0-9_
+ */
+ public static final Format SAFEST_FORMAT = new PortalObjectPath.LegacyFormat()
+ {
+
+ private final String EQUALS = "_e";
+ private final String SLASH = "_s";
+ private final String DOT = "_d";
+ private final String PLUS = "_p";
+
+ @Override
+ public String[] parse(String value)
+ {
+ String uncoded = value.replace(EQUALS, "=");
+ uncoded = uncoded.replace(SLASH, "/");
+ uncoded = uncoded.replace(DOT, ".");
+ uncoded = uncoded.replace(PLUS, "+");
+ return LEGACY_BASE64_FORMAT.parse(uncoded);
+ }
+
+ @Override
+ public String toString(String[] names, int from, int to)
+ {
+ String encoded = LEGACY_BASE64_FORMAT.toString(names, from, to);
+ encoded = encoded.replace("=", EQUALS);
+ encoded = encoded.replace("/", SLASH);
+ encoded = encoded.replace(".", DOT);
+ encoded = encoded.replace("+", PLUS);
+ return encoded;
+ }
+ };
+
}
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-03-13 13:49:31 UTC (rev 13030)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-03-13 14:38:33 UTC (rev 13031)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -25,11 +25,11 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.core.controller.ControllerContext;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.content.WindowRendition;
-import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
@@ -84,7 +84,7 @@
//
return new WindowContext(
- PortletUtils.generateNamespaceFrom(window.getId().toString()),
+ window.getId().toString(PortalObjectPath.SAFEST_FORMAT),
region,
order,
windowResult);
More information about the portal-commits
mailing list