Author: hoang_to
Date: 2010-02-24 02:00:16 -0500 (Wed, 24 Feb 2010)
New Revision: 1829
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
Log:
GTNPORTAL-637: Show exception when edit page in special case
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-02-24
04:55:24 UTC (rev 1828)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-02-24
07:00:16 UTC (rev 1829)
@@ -644,13 +644,17 @@
return;
}
- // Perform mop update
+ // Perform model update
DataStorage dataService =
uiWorkingWS.getApplicationComponent(DataStorage.class);
dataService.save(page);
uiToolPanel.setUIComponent(null);
+ // Synchronize model object with UIPage object, that seems redundant but in
fact
+ // mandatory to have consequent edit actions (on the same page) work properly
+ page = dataService.getPage(page.getPageId());
uiPage.getChildren().clear();
PortalDataMapper.toUIPage(uiPage, page);
+
// Update UIPage cache on UIPortal
uiPortal.setUIPage(pageId, uiPage);
uiPortal.refreshUIPage();
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-02-24
04:55:24 UTC (rev 1828)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-02-24
07:00:16 UTC (rev 1829)
@@ -85,7 +85,9 @@
uiToolPanel.setShowMaskLayer(false);
uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
- UIPage newUIPage = new UIPage();
+ // We clone the edited UIPage object, that is required for Abort action
+ //UIPage newUIPage = new UIPage();
+ UIPage newUIPage = uiWorkingWS.createUIComponent(UIPage.class, null, null);
PortalDataMapper.toUIPage(newUIPage, page);
uiToolPanel.setWorkingComponent(newUIPage);
event.getRequestContext().addUIComponentToUpdateByAjax(uiWorkingWS);
Show replies by date