Author: thomas.heute(a)jboss.com
Date: 2010-04-01 09:26:53 -0400 (Thu, 01 Apr 2010)
New Revision: 2454
Modified:
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
Log:
JBEPP-240: Problem with several iframe portlet in same page
Modified:
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
---
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-04-01
13:09:37 UTC (rev 2453)
+++
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-04-01
13:26:53 UTC (rev 2454)
@@ -25,6 +25,7 @@
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.portal.config.UserPortalConfigService;
+import org.exoplatform.portal.config.model.ApplicationState;
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.CloneApplicationState;
import org.exoplatform.portal.config.model.Container;
@@ -376,7 +377,18 @@
}
else
{
- CloneApplicationState state = new
CloneApplicationState<Object>(app.getStorageId());
+ ApplicationState state;
+ // if we have a new portlet added to the page we need for it to have
its own state.
+ // otherwise all new portlets added to a page will have the same
state.
+ if (newComponent)
+ {
+ state = new
TransientApplicationState<Object>(app.getContentId());
+ }
+ // if the portlet is not new, then we should clone it from the original
portlet
+ else
+ {
+ state = new
CloneApplicationState<Object>(app.getStorageId());
+ }
uiPortlet.setState(new PortletState(state, applicationType));
}
uiPortlet.setPortletInPortal(uiTarget instanceof UIPortal);
Show replies by date