[gatein-commits] gatein SVN: r2627 - in portal/trunk: webui/portal/src/main/java/org/exoplatform/portal/webui/navigation and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Apr 14 07:01:17 EDT 2010


Author: kien_nguyen
Date: 2010-04-14 07:01:16 -0400 (Wed, 14 Apr 2010)
New Revision: 2627

Modified:
   portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemap2.gtmpl
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
Log:
GTNPORTAL-1005 NPE when click Expand page(node) in Sitemap page in special case

Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemap2.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemap2.gtmpl	2010-04-14 10:18:04 UTC (rev 2626)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemap2.gtmpl	2010-04-14 11:01:16 UTC (rev 2627)
@@ -3,5 +3,5 @@
 					
 		def uiPortalNavigation = uicomponent.getChild(UIPortalNavigation.class); 
 		uiPortalNavigation.loadTreeNodes();
-		uicomponent.renderChild(UIPortalNavigation.class);
+		uicomponent.renderChildren();
 %>
\ No newline at end of file

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java	2010-04-14 10:18:04 UTC (rev 2626)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java	2010-04-14 11:01:16 UTC (rev 2627)
@@ -277,8 +277,11 @@
             expandTree = treeNode.getChildByPath(uri, treeNode);
          }
 
-         expandTree.setChildren(expandNode.getChildren(), selectNav);
-
+         if(expandTree != null)
+         {
+            expandTree.setChildren(expandNode.getChildren(), selectNav);
+         }
+         
          event.getRequestContext().addUIComponentToUpdateByAjax(uiNavigation);
       }
    }
@@ -315,9 +318,13 @@
          {
             expandTree = treeNode.getChildByPath(uri, treeNode);
          }
-
-         expandTree.setExpanded(false);
-
+         
+         if(expandTree != null) 
+         {
+            expandTree.setExpanded(false);
+         }
+         
+         event.getRequestContext().addUIComponentToUpdateByAjax(uiNavigation);
       }
    }
 



More information about the gatein-commits mailing list