Author: kien_nguyen
Date: 2011-05-25 03:25:02 -0400 (Wed, 25 May 2011)
New Revision: 6552
Modified:
portal/branches/branch-GTNPORTAL-1872/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
Log:
GTNPORTAL-1898 New dashboard page (node) isnt visible at Tabbed dashboard
Modified:
portal/branches/branch-GTNPORTAL-1872/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1872/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2011-05-25
06:43:27 UTC (rev 6551)
+++
portal/branches/branch-GTNPORTAL-1872/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2011-05-25
07:25:02 UTC (rev 6552)
@@ -73,8 +73,6 @@
private DataStorage dataService;
- private PageNavigation pageNavigation;
-
private UIPortal uiPortal;
final private static int MAX_SHOWED_TAB_NUMBER = 6;
@@ -86,17 +84,8 @@
configService = getApplicationComponent(UserPortalConfigService.class);
dataService = getApplicationComponent(DataStorage.class);
uiPortal = Util.getUIPortal();
- initPageNavigation();
}
- private void initPageNavigation() throws Exception
- {
- //String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- //pageNavigation = getPageNavigation(PortalConfig.USER_TYPE + "::" +
remoteUser);
- //TODO: Check this part carefully
- this.pageNavigation = uiPortal.getSelectedNavigation();
- }
-
/*
private PageNavigation getPageNavigation(String owner) throws Exception
{
@@ -148,11 +137,7 @@
public PageNavigation getPageNavigation() throws Exception
{
- if (pageNavigation == null)
- {
- initPageNavigation();
- }
- return pageNavigation;
+ return uiPortal.getSelectedNavigation();
}
/**
@@ -164,6 +149,7 @@
{
try
{
+ PageNavigation pageNavigation = getPageNavigation();
List<PageNode> nodes = pageNavigation.getNodes();
PageNode tobeRemoved = nodes.get(nodeIndex);
PageNode selectedNode = uiPortal.getSelectedNode();
@@ -236,6 +222,7 @@
{
nodeLabel = "Tab_" + getCurrentNumberOfTabs();
}
+ PageNavigation pageNavigation = getPageNavigation();
Page page =
configService.createPageTemplate(UITabPaneDashboard.PAGE_TEMPLATE,
pageNavigation.getOwnerType(),
pageNavigation.getOwnerId());
@@ -309,9 +296,9 @@
return true;
}
- private boolean nameExisted(String nodeName)
+ private boolean nameExisted(String nodeName) throws Exception
{
- for (PageNode node : pageNavigation.getNodes())
+ for (PageNode node : getPageNavigation().getNodes())
{
if (node.getName().equals(nodeName))
{
@@ -325,6 +312,7 @@
{
try
{
+ PageNavigation pageNavigation = getPageNavigation();
List<PageNode> nodes = pageNavigation.getNodes();
List<PageNode> selectedPath = uiPortal.getSelectedPath();
PageNode parentNode = null;
@@ -383,6 +371,7 @@
try
{
+ PageNavigation pageNavigation = getPageNavigation();
ArrayList<PageNode> nodes = pageNavigation.getNodes();
PageNode firstNode = nodes.get(firstIndex);
PageNode secondNode = nodes.get(secondIndex);