Author: hoang_to
Date: 2010-04-21 21:58:34 -0400 (Wed, 21 Apr 2010)
New Revision: 2739
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
Log:
GTNPORTAL-1091: Refactor rotten Java code
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-04-21
20:08:22 UTC (rev 2738)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-04-22
01:58:34 UTC (rev 2739)
@@ -111,12 +111,11 @@
public void initNavigations(List<PageNavigation> navis) throws Exception
{
navigations = navis;
- // set resolved label for navigations
WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
localizeNavigation(requestContext.getLocale());
- updateUI();
- selectNavigation();
+ updateNodeTree();
+ initEditedData();
}
public void loadNavigationByNavId(Integer navId, List<PageNavigation>
navigations) throws Exception
@@ -128,7 +127,7 @@
selectNavigation(navId);
}
- private void updateUI()
+ private void updateNodeTree()
{
if (navigations == null || navigations.size() < 1)
{
@@ -137,7 +136,11 @@
}
}
- private void selectNavigation()
+ /**
+ * Init the edited node as well as its parent, navigation
+ *
+ */
+ private void initEditedData()
{
if (navigations == null || navigations.size() < 1)
{
@@ -305,7 +308,7 @@
navigations = new ArrayList<PageNavigation>();
}
navigations.add(navigation);
- updateUI();
+ updateNodeTree();
}
public void deletePageNavigation(PageNavigation navigation)
@@ -317,8 +320,8 @@
navigations.remove(navigation);
deleteNavigations.add(navigation);
selectedNode = null;
- selectNavigation();
- updateUI();
+ initEditedData();
+ updateNodeTree();
}
public PageNavigation getPageNavigation(int id)
Show replies by date