Author: tkobayas(a)redhat.com
Date: 2011-05-09 13:09:54 -0400 (Mon, 09 May 2011)
New Revision: 6455
Modified:
epp/portal/branches/EPP_5_1_0_GA_JBEPP-876/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
Log:
JBEPP-876 Navigation is overwritten when creating two new pages with two browsers
Modified:
epp/portal/branches/EPP_5_1_0_GA_JBEPP-876/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
---
epp/portal/branches/EPP_5_1_0_GA_JBEPP-876/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2011-05-09
14:35:45 UTC (rev 6454)
+++
epp/portal/branches/EPP_5_1_0_GA_JBEPP-876/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2011-05-09
17:09:54 UTC (rev 6455)
@@ -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);
Show replies by date