Author: truong.le
Date: 2009-10-22 23:15:19 -0400 (Thu, 22 Oct 2009)
New Revision: 404
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
Log:
GTNPORTAL-56: NPE when edit node
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2009-10-23
03:01:17 UTC (rev 403)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2009-10-23
03:15:19 UTC (rev 404)
@@ -362,9 +362,8 @@
uiNodeForm.setSelectedParent(parent);
// set navigation owner, navigation type
- UINavigationManagement nodeManager = uiNodeSelector.getParent();
- uiNodeForm.setOwner(nodeManager.getOwner());
- uiNodeForm.setOwnerType(nodeManager.getOwnerType());
+ uiNodeForm.setOwner(uiNodeSelector.getSelectedNavigation().getOwnerId());
+ uiNodeForm.setOwnerType(uiNodeSelector.getSelectedNavigation().getOwnerType());
uiManagementPopup.setWindowSize(800, 500);
event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
@@ -469,6 +468,11 @@
UIPopupWindow uiManagementPopup =
uiNodeSelector.getAncestorOfType(UIPopupWindow.class);
UIPageNodeForm2 uiNodeForm = uiApp.createUIComponent(UIPageNodeForm2.class,
null, null);
uiManagementPopup.setUIComponent(uiNodeForm);
+
+ // set navigation owner, navigation type
+ uiNodeForm.setOwner(uiNodeSelector.getSelectedNavigation().getOwnerId());
+ uiNodeForm.setOwnerType(uiNodeSelector.getSelectedNavigation().getOwnerType());
+
uiNodeForm.setValues(selectedNode);
uiNodeForm.setSelectedParent(obj);
uiManagementPopup.setWindowSize(800, 500);
Show replies by date