Author: hoang_to
Date: 2010-02-07 22:35:02 -0500 (Sun, 07 Feb 2010)
New Revision: 1542
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
Log:
GTNPORTAL-584: Moving up/down node could not be saved
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2010-02-08
03:28:46 UTC (rev 1541)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2010-02-08
03:35:02 UTC (rev 1542)
@@ -100,9 +100,12 @@
UINavigationNodeSelector uiNodeSelector =
uiManagement.getChild(UINavigationNodeSelector.class);
UserPortalConfigService portalConfigService =
uiManagement.getApplicationComponent(UserPortalConfigService.class);
+
PageNavigation navigation = uiNodeSelector.getSelectedNavigation();
+ String editedOwnerType = navigation.getOwnerType();
+ String editedOwnerId = navigation.getOwnerId();
// Check existed
- PageNavigation persistNavigation =
portalConfigService.getPageNavigation(navigation.getOwnerType(),
navigation.getOwnerId());
+ PageNavigation persistNavigation =
portalConfigService.getPageNavigation(editedOwnerType, editedOwnerId);
if (persistNavigation == null) {
UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
uiApp.addMessage(new
ApplicationMessage("UINavigationManagement.msg.NavigationNotExistAnymore",
null));
@@ -137,11 +140,19 @@
{
portalConfigService.update(navigation);
}
- UIPortal uiPortal = Util.getUIPortal();
- setNavigation(uiPortal.getNavigations(), navigation);
+
+ UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
+ setNavigation(uiPortalApp.getNavigations(), navigation);
+
+ //Update UIPortal corredponding to edited navigation
+ UIPortal targetedUIPortal = uiPortalApp.getCachedUIPortal(editedOwnerType,
editedOwnerId);
+ if(targetedUIPortal != null)
+ {
+ targetedUIPortal.setNavigation(navigation);
+ }
+
UIPopupWindow uiPopup = uiManagement.getParent();
uiPopup.setShow(false);
- UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
prContext.setFullRender(true);
Show replies by date