Author: truong.le
Date: 2009-12-01 02:28:17 -0500 (Tue, 01 Dec 2009)
New Revision: 882
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java
Log:
GTNPORTAL-319: Can't select new tab when create new page for dashboard
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java 2009-12-01
03:47:12 UTC (rev 881)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java 2009-12-01
07:28:17 UTC (rev 882)
@@ -21,7 +21,9 @@
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.webui.navigation.UIPageNodeSelector;
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.Util;
@@ -144,12 +146,18 @@
UIPageNodeSelector uiNodeSelector = getChild(UIPageNodeSelector.class);
PageNode selectedNode = uiNodeSelector.getSelectedPageNode();
- if (selectedNode != null)
+ PageNavigation nav = uiNodeSelector.getSelectedNavigation();
+ if(nav.getOwnerType().equals(PortalConfig.USER_TYPE))
+ pageNode.setUri(pageNode.getName());
+ else
{
- pageNode.setUri(selectedNode.getUri() + "/" + pageNode.getName());
+ if (selectedNode != null)
+ {
+ pageNode.setUri(selectedNode.getUri() + "/" + pageNode.getName());
+ }
+ else
+ pageNode.setUri(pageNode.getName());
}
- else
- pageNode.setUri(pageNode.getName());
return pageNode;
}
@@ -188,6 +196,9 @@
public PageNode getSelectedPageNode()
{
UIPageNodeSelector uiPageNodeSelector = getChild(UIPageNodeSelector.class);
+ PageNavigation nav = uiPageNodeSelector.getSelectedNavigation();
+ if(nav.getOwnerType().equals(PortalConfig.USER_TYPE))
+ return null;
return uiPageNodeSelector.getSelectedPageNode();
}