gatein SVN: r2086 - in portal/trunk: web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic and 1 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-03-10 04:48:29 -0500 (Wed, 10 Mar 2010)
New Revision: 2086
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
Log:
GTNPORTAL-168: Problem when delete all nodes in portal navigation
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml 2010-03-10 09:24:00 UTC (rev 2085)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml 2010-03-10 09:48:29 UTC (rev 2086)
@@ -60,5 +60,13 @@
<visibility>SYSTEM</visibility>
<page-reference>portal::classic::register</page-reference>
</node>
+
+ <!-- NOT FOUND node -->
+ <node>
+ <uri>notfound</uri>
+ <name>notfound</name>
+ <label>NotFound</label>
+ <visibility>SYSTEM</visibility>
+ </node>
</page-nodes>
</node-navigation>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml 2010-03-10 09:24:00 UTC (rev 2085)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml 2010-03-10 09:48:29 UTC (rev 2086)
@@ -54,5 +54,12 @@
<visibility>SYSTEM</visibility>
<page-reference>portal::@owner@::register</page-reference>
</node>
+
+ <node>
+ <uri>notfound</uri>
+ <name>notfound</name>
+ <label>NotFound</label>
+ <visibility>SYSTEM</visibility>
+ </node>
</page-nodes>
</node-navigation>
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-03-10 09:24:00 UTC (rev 2085)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-03-10 09:48:29 UTC (rev 2086)
@@ -40,6 +40,7 @@
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.event.Event.Phase;
import java.util.ArrayList;
import java.util.List;
@@ -101,6 +102,14 @@
PageNode targetPageNode = getTargetedNode(targetedNav, targetPath);
List<PageNode> targetedPathNodes = findPath(targetedNav, targetPath);
+ //If targetPageNode is null, which happens only if the navigation contains only 'notfound' node,
+ //we send a change page node event for redirecting to 'notfound' node
+ if(targetPageNode == null)
+ {
+ redirectToNotFoundNode(showedUIPortal);
+ return;
+ }
+
if(formerNavType.equals(newNavType) && formerNavId.equals(newNavId))
{
//Case 1: Both navigation type and id are not changed, but current page node is changed
@@ -245,6 +254,8 @@
* Fetch the currently selected pageNode under a PageNavigation. It is the last node encountered
* while descending the pathNodes
*
+ * This method returns <code>null</code> iff only 'notfound' node remains in the navigation
+ *
* @param targetedNav
* @param pathNodes
* @return
@@ -254,13 +265,13 @@
//Case users browses to a URL of the form */portal/public/classic
if(pathNodes.length == 0)
{
- return targetedNav.getNodes().get(0);
+ return getDefaultNode(targetedNav);
}
PageNode currentNode = targetedNav.getNode(pathNodes[0]);
if(currentNode == null)
{
- return null;//Not found any node here
+ return getDefaultNode(targetedNav);
}
PageNode tempNode = null;
@@ -277,15 +288,46 @@
currentNode = tempNode;
}
}
-
return currentNode;
}
+ /**
+ * Default node of a navigation. This method returns
+ *
+ * 1. The first node in the list of 'nav' 's children if the list contains
+ * at least one child other than 'notfound'
+ *
+ * 2. <code>null</code> otherwise
+ *
+ * @param nav
+ * @return
+ */
+ private static PageNode getDefaultNode(PageNavigation nav)
+ {
+ PageNode defaultNode;
+ try
+ {
+ defaultNode = nav.getNodes().get(0);
+ }
+ catch (IndexOutOfBoundsException ex)
+ {
+ return null;
+ }
+ if (defaultNode != null && !("notfound".equals(defaultNode.getName())))
+ {
+ return defaultNode;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
private static List<PageNode> findPath(PageNavigation nav, String[] pathNodes)
{
List<PageNode> nodes = new ArrayList<PageNode>(4);
- //That happens when user browses to a URL like */portal/public/classic
+ //That happens when user browses to a URL like /portal/public/classic
if(pathNodes.length == 0)
{
nodes.add(nav.getNodes().get(0));
@@ -331,6 +373,12 @@
PortalDataMapper.toUIPortal(uiPortal, userPortalConfig);
return uiPortal;
}
+
+ private static void redirectToNotFoundNode(UIPortal uiPortal) throws Exception
+ {
+ PageNodeEvent<UIPortal> changePageNodeEvent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, "/notfound");
+ uiPortal.broadcast(changePageNodeEvent, Event.Phase.PROCESS);
+ }
}
14 years, 9 months
gatein SVN: r2085 - in portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view: UIPortalComponent and 1 other directory.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-03-10 04:24:00 -0500 (Wed, 10 Mar 2010)
New Revision: 2085
Modified:
portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
Log:
GTNPORTAL-813: In layout edit, portal element is missing the handle
Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css 2010-03-10 09:23:52 UTC (rev 2084)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css 2010-03-10 09:24:00 UTC (rev 2085)
@@ -19,7 +19,7 @@
/*##############################-Page Layout Decorator-################################*/
-.DragControlArea {
+.LAYOUT-BLOCK .PageLayoutDecorator {
cursor: move;
}
Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css 2010-03-10 09:23:52 UTC (rev 2084)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css 2010-03-10 09:24:00 UTC (rev 2085)
@@ -302,4 +302,5 @@
opacity: 0;
filter: alpha(opacity=0);
background: #ffffff;
+ cursor:move;
}
14 years, 9 months
gatein SVN: r2083 - portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-03-10 03:46:20 -0500 (Wed, 10 Mar 2010)
New Revision: 2083
Modified:
portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
Log:
GTNPORTAL-813: In layout edit, portal element is missing the handle
Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css 2010-03-10 08:11:08 UTC (rev 2082)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css 2010-03-10 08:46:20 UTC (rev 2083)
@@ -18,6 +18,11 @@
*/
/*##############################-Page Layout Decorator-################################*/
+
+.DragControlArea {
+ cursor: move;
+}
+
.UIPageBody .PageLayoutDecorator {
padding: 0px;
margin: 0px 2px auto 2px;
14 years, 9 months
gatein SVN: r2081 - maven/parent/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-10 02:50:13 -0500 (Wed, 10 Mar 2010)
New Revision: 2081
Added:
maven/parent/tags/1.0.0-GA/
Log:
[maven-scm] copy for tag 1.0.0-GA
Copied: maven/parent/tags/1.0.0-GA (from rev 2080, maven/parent/trunk)
14 years, 9 months
gatein SVN: r2078 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-03-10 02:31:31 -0500 (Wed, 10 Mar 2010)
New Revision: 2078
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_20_019.html
Log:
GTNPORTAL-839: Create new test for "POR_20_019"
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_20_019.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_20_019.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_20_019.html 2010-03-10 07:31:31 UTC (rev 2078)
@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_20_019</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_20_019</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Go to Page Management--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Select Page Mangement on menu item--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIPageBrowser']/div[2]/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPageBrowser']/div[2]/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//form[@id='UIPageForm']/div[3]/div[1]/div[1]/div/table</td>
+ <td>user portal group</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>ownerType</td>
+ <td>label=group</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>POR_20_019</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>POR_20_019</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPageForm', 'UIPageTemplateOptions');javascript:eXo.webui.UIForm.submitEvent('UIPageForm','SelectTab','&objectId=UIPageTemplateOptions')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPageForm', 'PermissionSetting');javascript:eXo.webui.UIForm.submitEvent('UIPageForm','SelectTab','&objectId=PermissionSetting')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Access Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPageForm', 'UIPageTemplateOptions');javascript:eXo.webui.UIForm.submitEvent('UIPageForm','SelectTab','&objectId=UIPageTemplateOptions')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Create same name group pages in the same group--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIPageBrowser']/div[2]/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPageBrowser']/div[2]/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//form[@id='UIPageForm']/div[3]/div[1]/div[1]/div/table</td>
+ <td>user portal group</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>ownerType</td>
+ <td>label=group</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>POR_20_019</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>POR_20_019</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPageForm', 'UIPageTemplateOptions');javascript:eXo.webui.UIForm.submitEvent('UIPageForm','SelectTab','&objectId=UIPageTemplateOptions')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Verify Error message</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>This page name already exists.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Search new page created--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>searchTerm</td>
+ <td>POR_20_019</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>searchOption</td>
+ <td>label=Title</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Delete page created--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Do you want to delete this page?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 9 months
gatein SVN: r2077 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/issues.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-03-10 02:30:12 -0500 (Wed, 10 Mar 2010)
New Revision: 2077
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/issues/Test_SNF_PRL_33.html
Log:
Move "Test_SNF_PRL_33.html" to issues folder
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/issues/Test_SNF_PRL_33.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/issues/Test_SNF_PRL_33.html 2010-03-10 05:56:33 UTC (rev 2076)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/issues/Test_SNF_PRL_33.html 2010-03-10 07:30:12 UTC (rev 2077)
@@ -162,9 +162,9 @@
<td></td>
</tr>
<tr>
- <td>Known issue : https://jira.jboss.org/jira/browse/GTNPORTAL-837</td>
+ <td>echo</td>
+ <td>--Known issue : https://jira.jboss.org/jira/browse/GTNPORTAL-837</td>
<td></td>
- <td></td>
</tr>
<tr>
<td>echo</td>
14 years, 9 months