Author: tkobayas(a)redhat.com
Date: 2011-04-14 04:05:17 -0400 (Thu, 14 Apr 2011)
New Revision: 6214
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
Log:
GTNPORTAL-1823 Fail to create one page when creating two new pages at the same time. --
This fix only addresses navigation overwriting.
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2011-04-14
07:15:19 UTC (rev 6213)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2011-04-14
08:05:17 UTC (rev 6214)
@@ -36,7 +36,6 @@
import org.exoplatform.portal.webui.workspace.UIPortalToolPanel;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
@@ -92,6 +91,22 @@
UIPageNodeSelector uiNodeSelector = uiPageInfo.getChild(UIPageNodeSelector.class);
PageNode selectedNode = uiNodeSelector.getSelectedPageNode();
PageNavigation pageNav = uiNodeSelector.getSelectedNavigation();
+
+ // reload page navigation
+ DataStorage dataService = getApplicationComponent(DataStorage.class);
+ pageNav = dataService.getPageNavigation(pageNav.getOwnerType(),
pageNav.getOwnerId());
+ UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
+ setNavigation(uiPortalApp.getNavigations(), pageNav);
+ uiPortalApp.localizeNavigations();
+ UIPortal uiPortal = Util.getUIPortal();
+ uiPortal.setNavigation(pageNav);
+ uiNodeSelector.selectNavigation(pageNav);
+ if (selectedNode != null)
+ {
+ uiNodeSelector.selectPageNodeByUri(selectedNode.getUri());
+ selectedNode = uiNodeSelector.getSelectedPageNode();
+ }
+
if (PortalConfig.USER_TYPE.equals(pageNav.getOwnerType()))
selectedNode = null;
@@ -114,11 +129,8 @@
}
uiNodeSelector.selectPageNodeByUri(pageNode.getUri());
- DataStorage dataService = getApplicationComponent(DataStorage.class);
dataService.create(page);
dataService.save(pageNav);
- UIPortal uiPortal = Util.getUIPortal();
- setNavigation(uiPortal.getNavigations(), uiNodeSelector.getSelectedNavigation());
}
private void setNavigation(List<PageNavigation> navs, PageNavigation nav)
Show replies by date