Author: hoang_to
Date: 2010-05-05 04:40:07 -0400 (Wed, 05 May 2010)
New Revision: 2981
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIFilterableTree.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
Log:
GTNPORTAL-1128: NPE when click edit newly added group navigation
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIFilterableTree.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIFilterableTree.java 2010-05-05
07:55:37 UTC (rev 2980)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIFilterableTree.java 2010-05-05
08:40:07 UTC (rev 2981)
@@ -61,6 +61,10 @@
*/
public int getRightMostDisplayedNodeIndex(List<Object> sibblings,
WebuiRequestContext context)
{
+ if(sibblings == null)
+ {
+ return -1;
+ }
int numberOfSibblings = sibblings.size();
if (nodeFilter == null)
{
@@ -88,6 +92,10 @@
*/
public int getLeftMostDisplayedNodeIndex(List<Object> sibblings,
WebuiRequestContext context)
{
+ if(sibblings == null)
+ {
+ return -1;
+ }
int numberOfSibblings = sibblings.size();
if (nodeFilter == null)
{
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 2010-05-05
07:55:37 UTC (rev 2980)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-05-05
08:40:07 UTC (rev 2981)
@@ -169,7 +169,10 @@
if (edittedTreeNodeData == null)
{
edittedTreeNodeData = new TreeNodeData(edittedNavigation);
- selectPageNodeByUri(edittedTreeNodeData.getNode().getUri());//TODO: Check null
+ if(edittedTreeNodeData.getNode() != null)
+ {
+ selectPageNodeByUri(edittedTreeNodeData.getNode().getUri());
+ }
}
UITree tree = getChild(UITree.class);
Show replies by date