[gatein-commits] gatein SVN: r1925 - in portal/trunk/webui/portal/src/main/java/org/exoplatform/portal: webui/application and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Mar 2 10:55:15 EST 2010
Author: julien_viet
Date: 2010-03-02 10:55:15 -0500 (Tue, 02 Mar 2010)
New Revision: 1925
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoWindowContext.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
Log:
use the window id of the portlet to scope applicaton state in the portal session
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java 2010-03-02 10:14:19 UTC (rev 1924)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java 2010-03-02 15:55:15 UTC (rev 1925)
@@ -41,7 +41,7 @@
{
/** . */
- private static final String APPLICATION_ATTRIBUTE_PREFIX = "rsm.";
+ private static final String APPLICATION_ATTRIBUTE_PREFIX = "psm.";
/** . */
private static final Logger log = LoggerFactory.getLogger(PortalStateManager.class);
@@ -152,9 +152,7 @@
if (webuiRC instanceof PortletRequestContext)
{
PortletRequestContext portletRC = (PortletRequestContext)webuiRC;
-
- // We are temporarily not using the window id as it changes when the back end is not the same
- return portletRC.getApplication().getApplicationId()/* + "/" + portletRC.getWindowId()*/;
+ return portletRC.getApplication().getApplicationId() + "/" + portletRC.getWindowId();
}
else
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoWindowContext.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoWindowContext.java 2010-03-02 10:14:19 UTC (rev 1924)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoWindowContext.java 2010-03-02 15:55:15 UTC (rev 1925)
@@ -31,8 +31,18 @@
/** . */
private final String windowId;
- public ExoWindowContext(String windowId)
+ /**
+ * Create a new window context.
+ *
+ * @param windowId the window id
+ * @throws NullPointerException thrown when the windowId parameter is null
+ */
+ public ExoWindowContext(String windowId) throws NullPointerException
{
+ if (windowId == null)
+ {
+ throw new NullPointerException();
+ }
this.windowId = windowId;
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-03-02 10:14:19 UTC (rev 1924)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-03-02 15:55:15 UTC (rev 1925)
@@ -779,8 +779,7 @@
PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
// Get marshalled version
- StatefulPortletContext<C> updatedCtx =
- (StatefulPortletContext<C>)portletInvoker.setProperties(portletContext, changes);
+ StatefulPortletContext<C> updatedCtx = (StatefulPortletContext<C>)portletInvoker.setProperties(portletContext, changes);
//
C updateState = updatedCtx.getState();
More information about the gatein-commits
mailing list