Author: hoang_to
Date: 2010-02-24 05:08:10 -0500 (Wed, 24 Feb 2010)
New Revision: 1834
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
Log:
GTNPORTAL-622: Show duplicate portlet in special case
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-02-24
10:06:29 UTC (rev 1833)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-02-24
10:08:10 UTC (rev 1834)
@@ -335,7 +335,13 @@
//Switch portal application to edit mode
uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
- UIPage uiPage = Util.toUIPage(page, uiPageBrowser);
+ UIWorkingWorkspace uiWorkingWS =
uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
+ UIEditInlineWorkspace editInlineWS =
uiWorkingWS.getChild(UIEditInlineWorkspace.class);
+
+ //Clone a UIPage object, that is required for Abort action
+ UIPage uiPage = editInlineWS.createUIComponent(UIPage.class, null, null);
+ PortalDataMapper.toUIPage(uiPage, page);
+
UIPageBody uiPageBody = uiPortalApp.findFirstComponentOfType(UIPageBody.class);
if (uiPageBody.getUIComponent() != null)
uiPageBody.setUIComponent(null);
@@ -351,9 +357,6 @@
return;
}
- uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
- UIWorkingWorkspace uiWorkingWS =
uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
- UIEditInlineWorkspace editInlineWS =
uiWorkingWS.getChild(UIEditInlineWorkspace.class);
editInlineWS.setRendered(true);
editInlineWS.setUIComponent(uiPage);