JBoss Portal SVN: r12906 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core: model/portal/command/view and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-02-28 09:11:23 -0500 (Sat, 28 Feb 2009)
New Revision: 12906
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java
Log:
- JBPORTAL-2326:
+ Not sure why previous PNS was saved in ViewPageCommand: limited testing hasn't shown any adverse side effects so far
+ Do not iterate over all bindings when looking for PNS for a window (was previously overwriting found PNS)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2009-02-27 21:46:10 UTC (rev 12905)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2009-02-28 14:11:23 UTC (rev 12906)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,24 +22,24 @@
******************************************************************************/
package org.jboss.portal.core.controller.portlet;
+import org.jboss.portal.core.CoreConstants;
+import org.jboss.portal.core.controller.coordination.CoordinationManager;
+import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.navstate.NavigationalStateContext;
import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.info.NavigationInfo;
import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.core.CoreConstants;
-import org.jboss.portal.core.navstate.NavigationalStateContext;
-import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.core.controller.coordination.CoordinationManager;
-import javax.xml.namespace.QName;
import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-import java.util.Collection;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
@@ -102,12 +102,10 @@
this.implicitMode = getCoordinationManager().resolveParameterBindingImplicitModeEnabled(controllerContext.getPage());
}
- /**
- * Flush all updates to the navigational state context.
- */
+ /** Flush all updates to the navigational state context. */
public void flushUpdates()
{
-
+
if (windowPublicNavigationalStateUpdate != null && updates != null)
{
for (Map.Entry<String, HashMap<QName, String[]>> entry : windowPublicNavigationalStateUpdate.entrySet())
@@ -125,7 +123,7 @@
{
Map<String, String[]> parameters = new HashMap<String, String[]>();
-
+
for (Map.Entry<QName, String[]> value : entry.getValue().entrySet())
{
parameters.put(value.getKey().toString(), value.getValue());
@@ -140,7 +138,7 @@
windowPublicNavigationalStateUpdate.clear();
}
-
+
if (updates != null)
{
for (Map.Entry<String, org.jboss.portal.core.model.portal.navstate.WindowNavigationalState> entry : updates.entrySet())
@@ -195,11 +193,10 @@
}
-
}
/**
- *
+ *
*/
public Set<String> getPortletWindowIds()
{
@@ -207,7 +204,7 @@
}
/**
- *
+ *
*/
public PortletWindowNavigationalState getPortletWindowNavigationalState(String windowName) throws IllegalArgumentException
{
@@ -250,7 +247,7 @@
}
/**
- *
+ *
*/
public void setPortletWindowNavigationalState(String windowName, PortletWindowNavigationalState windowNavigationalState) throws IllegalArgumentException, IllegalStateException
{
@@ -286,13 +283,11 @@
initiateWindowPublicNavigationalStateUpdate();
}
- //
if (windowPublicNavigationalStateUpdate.get(windowName) == null)
{
windowPublicNavigationalStateUpdate.put(windowName, new HashMap<QName, String[]>());
}
- //
windowPublicNavigationalStateUpdate.get(windowName).put(name, value);
}
@@ -307,13 +302,13 @@
{
value = windowPublicNavigationalStateUpdate.get(windowName).get(name);
}
-
+
}
-
+
//
if (value == null)
{
-
+
Window window = controllerContext.getWindow(windowName);
org.jboss.portal.core.model.portal.navstate.WindowNavigationalState wns = navigationalStateContext.getWindowNavigationalState(window.getId().toString());
@@ -332,9 +327,7 @@
return value != null && value.length > 0 ? value : null;
}
- /**
- * For now we do not implement any kind of mapping between qnames, it's the basic straightforward 1-1 mapping.
- */
+ /** For now we do not implement any kind of mapping between qnames, it's the basic straightforward 1-1 mapping. */
public Map<String, String[]> getPortletPublicNavigationalState(String windowName) throws IllegalArgumentException
{
PortletInfo info = controllerContext.getPortletInfo(windowName);
@@ -347,70 +340,77 @@
initiateWindowPublicNavigationalStateUpdate();
}
- //
- if (info != null && info.getNavigation() != null)
+ if (info != null)
{
- Map<String, String[]> publicNavigationalState = new HashMap<String, String[]>();
- for (ParameterInfo parameterInfo : info.getNavigation().getPublicParameters())
+ NavigationInfo navigation = info.getNavigation();
+ if (navigation != null)
{
-
- Collection<String> bindings = manager.getBindingNames(getWindow(windowName), parameterInfo.getName());
-
- // Don't store the URI as a page scoped public render parameter but window scoped
- // Also for explicit and parameter with no bindings
- if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(parameterInfo.getName()) || (!implicitMode && bindings.size() == 0))
+ Map<String, String[]> publicNavigationalState = new HashMap<String, String[]>();
+ for (ParameterInfo parameterInfo : navigation.getPublicParameters())
{
- String[] parameterValue = getWindowPublicNavigationalState(windowName, parameterInfo.getName());
- //
- if (parameterValue != null)
+ QName parameterName = parameterInfo.getName();
+ Collection<String> bindings = manager.getBindingNames(getWindow(windowName), parameterName);
+
+ // Don't store the URI as a page scoped public render parameter but window scoped
+ // Also for explicit and parameter with no bindings
+ if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(parameterName) || (!implicitMode && bindings.size() == 0))
{
- String parameterId = parameterInfo.getId();
+ String[] parameterValue = getWindowPublicNavigationalState(windowName, parameterName);
- // We clone the value here so we keep the internal state not potentially changed
- publicNavigationalState.put(parameterId, parameterValue.clone());
+ if (parameterValue != null)
+ {
+ String parameterId = parameterInfo.getId();
+ // We clone the value here so we keep the internal state not potentially changed
+ publicNavigationalState.put(parameterId, parameterValue.clone());
+ }
}
- }
- else
- {
- String[] parameterValue = getPublicNavigationalState(parameterInfo.getName());
+ else
+ {
+ String[] parameterValue = getPublicNavigationalState(parameterName);
- // Explicit binding
- String[] explicitParameterValue = null;
+ // Explicit binding
+ String[] explicitParameterValue = null;
- // Check all bindings for this window/qname pair
- // If this window/qname is binded several times with different updated params value will be unpredictable...
- for (String binding : bindings)
- {
- explicitParameterValue = getPublicNavigationalState(new QName(XMLConstants.DEFAULT_NS_PREFIX, binding));
- }
+ // Check all bindings for this window/qname pair
+ // If this window/qname is bound several times with different updated params value will be unpredictable...
+ for (String binding : bindings)
+ {
+ explicitParameterValue = getPublicNavigationalState(new QName(XMLConstants.DEFAULT_NS_PREFIX, binding));
- //
- String parameterId = parameterInfo.getId();
+ // if a PNS has been found for a binding, use it and do not look further
+ if (explicitParameterValue != null)
+ {
+ break;
+ }
+ }
- //
- if (explicitParameterValue != null)
- {
- // We clone the value here so we keep the internal state not potentially changed
- publicNavigationalState.put(parameterId, explicitParameterValue.clone());
+ //
+ String parameterId = parameterInfo.getId();
+
+ //
+ if (explicitParameterValue != null)
+ {
+ // We clone the value here so we keep the internal state not potentially changed
+ publicNavigationalState.put(parameterId, explicitParameterValue.clone());
+ }
+ else if (implicitMode && parameterValue != null)
+ {
+ // We clone the value here so we keep the internal state not potentially changed
+ publicNavigationalState.put(parameterId, parameterValue.clone());
+ }
}
- else if (implicitMode && parameterValue != null)
- {
- // We clone the value here so we keep the internal state not potentially changed
- publicNavigationalState.put(parameterId, parameterValue.clone());
- }
}
- }
- //
- return publicNavigationalState;
+ //
+ return publicNavigationalState;
+ }
}
//
return null;
}
-
public String getPublicNavigationalParameterId(String windowName, QName name)
@@ -434,7 +434,7 @@
}
/**
- *
+ *
*/
public void setPortletPublicNavigationalState(String windowName, Map<String, String[]> update)
{
@@ -472,7 +472,7 @@
// Don't store the URI as a page scoped public render parameter but window scoped
// Also for explicit and parameter with no bindings
if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(name)
- || (!implicitMode && bindings.size() == 0))
+ || (!implicitMode && bindings.size() == 0))
{
if (value.length > 0)
{
@@ -509,7 +509,7 @@
}
/**
- *
+ *
*/
public Set<QName> getPublicNames()
{
@@ -523,7 +523,7 @@
}
/**
- *
+ *
*/
public String[] getPublicNavigationalState(QName name) throws IllegalArgumentException
{
@@ -552,7 +552,7 @@
}
/**
- *
+ *
*/
public void setPublicNavigationalState(QName name, String[] value) throws IllegalArgumentException, IllegalStateException
{
@@ -572,7 +572,7 @@
}
/**
- *
+ *
*/
public void removePublicNavigationalState(QName name) throws IllegalArgumentException, IllegalStateException
{
@@ -592,7 +592,7 @@
}
/**
- *
+ *
*/
public HashMap<QName, String[]> getWindowPublicContentStateParameters(String windowName)
{
@@ -617,13 +617,11 @@
}
}
}
-
+
return params;
}
- /**
- * @throws IllegalStateException if the public navigational state of the window is already initialized
- */
+ /** @throws IllegalStateException if the public navigational state of the window is already initialized */
private void initiateWindowPublicNavigationalStateUpdate() throws IllegalStateException
{
if (windowPublicNavigationalStateUpdate != null)
@@ -653,5 +651,4 @@
}
-
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java 2009-02-27 21:46:10 UTC (rev 12905)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java 2009-02-28 14:11:23 UTC (rev 12906)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,24 +22,23 @@
******************************************************************************/
package org.jboss.portal.core.model.portal.command.view;
+import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerException;
import org.jboss.portal.core.controller.ControllerResponse;
-import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ViewCommandInfo;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.model.portal.command.PageCommand;
import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateContext;
-import org.jboss.portal.common.util.ParameterMap;
-import javax.xml.namespace.QName;
import javax.xml.XMLConstants;
-import java.util.Map;
+import javax.xml.namespace.QName;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -52,7 +51,7 @@
private static final CommandInfo info = new ViewCommandInfo();
/** . */
- private static final Map<String,String[]> EMPTY_PARAMETERS = Collections.emptyMap();
+ private static final Map<String, String[]> EMPTY_PARAMETERS = Collections.emptyMap();
/** . */
private Map<String, String[]> parameters;
@@ -106,12 +105,6 @@
//
Map<QName, String[]> state = new HashMap<QName, String[]>();
- // Clone the previous state if needed
- if (previousPNS != null)
- {
- state.putAll(previousPNS.getParameters());
- }
-
//
for (Map.Entry<String, String[]> entry : parameters.entrySet())
{
15 years, 2 months
JBoss Portal SVN: r12905 - in branches/JBoss_Portal_Branch_2_7: core/src/bin/portal-core-war/themes/renewal and 2 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-02-27 16:46:10 -0500 (Fri, 27 Feb 2009)
New Revision: 12905
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_admin.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_current.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_hover2.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_admin.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_current.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_hover2.gif
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java
Log:
JBPORTAL-2285,JBPORTAL-2277
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_admin.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_current.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_hover2.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_admin.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_current.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_hover2.gif
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-02-27 21:23:59 UTC (rev 12904)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-02-27 21:46:10 UTC (rev 12905)
@@ -252,7 +252,7 @@
bottom: -5px;
left: 0;
min-width: 550px;
- z-index: 1;
+ z-index: 10;
}
ul#tabsHeader li {
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2009-02-27 21:23:59 UTC (rev 12904)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2009-02-27 21:46:10 UTC (rev 12905)
@@ -119,6 +119,7 @@
markup.print("<script type='text/javascript' src='");
markup.print(jsBase);
markup.print("/dyna.js'></script>\n");
+ markup.print("<link rel=\"stylesheet\" id=\"dyna_css\" href=\"" + jsBase + "/style.css\" type=\"text/css\"/>\n");
markup.print("<script type='text/javascript'>\n");
// Async server URL needed for callbacks
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java 2009-02-27 21:23:59 UTC (rev 12904)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java 2009-02-27 21:46:10 UTC (rev 12905)
@@ -86,13 +86,14 @@
PortalTheme theme = themeContext.getTheme();
// Hard code here for now
- // todo remove that hack
- String jsBase = rendererContext.getProperty(DynaConstants.RESOURCE_BASE_URL);
+
+ //JBPORTAL-2285 - move to render with other dyna scripts in DynaRegionRenderer
+ /*String jsBase = rendererContext.getProperty(DynaConstants.RESOURCE_BASE_URL);
if (jsBase != null)
{
out.print("<link rel=\"stylesheet\" id=\"dyna_css\" href=\"" + jsBase + "/style.css\" type=\"text/css\"/>\n");
}
-
+ */
// If no theme provided we use what may be on the tag
if (theme == null && themeName != null && themeName.length() > 0)
{
15 years, 2 months
JBoss Portal SVN: r12904 - in branches/JBoss_Portal_Branch_2_7/core/src: bin/portal-core-war/images and 2 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-02-27 16:23:59 -0500 (Fri, 27 Feb 2009)
New Revision: 12904
Added:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/images/logo-small-blue.gif
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
Log:
JBPORTAL-2227
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css 2009-02-27 19:24:47 UTC (rev 12903)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css 2009-02-27 21:23:59 UTC (rev 12904)
@@ -33,14 +33,16 @@
}
div.login-container div.login-header {
- background-image: url( ../images/modal/login-header-bg.gif );
- background-position: top left;
- background-repeat: repeat-x;
+ background: url(../themes/renewal/images/header-bg-left-shadow2.gif) repeat-x top left;
width: 255px;
- height: 27px;
+ height: 30px;
text-align: left;
}
+div.login-container div.login-header img {
+ margin: 5px 0 0 5px;
+}
+
div.login-container div.login-header h2 {
color: #fff;
font-weight: bold;
Added: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/images/logo-small-blue.gif
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/images/logo-small-blue.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2009-02-27 19:24:47 UTC (rev 12903)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2009-02-27 21:23:59 UTC (rev 12904)
@@ -29,7 +29,7 @@
document.write('<a href=\"<%= loginURL %>\">Login</a>');
}
//set the iframe src for login modal to requested URL
- var iframeSrc = '<%= loginURL %>' + '?loginheight=0';
+ var iframeSrc = '<%= loginURL %>';
document.getElementById('loginIframe').src = iframeSrc;
/* ]]> */
</script>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-02-27 19:24:47 UTC (rev 12903)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-02-27 21:23:59 UTC (rev 12904)
@@ -21,36 +21,37 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
<%@ page pageEncoding="utf-8" %>
-<%@page import="org.jboss.portal.common.util.ParameterValidation" %>
<%@page import="org.jboss.portal.identity.UserStatus" %>
<%@page import="java.util.ResourceBundle" %>
<%
ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
- String loginheight = request.getParameter("loginheight");
- boolean paramPresent = loginheight != null;
- loginheight = ParameterValidation.sanitizeFromPattern(loginheight, ParameterValidation.CSS_DISTANCE, "300px");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><%= rb.getString("LOGIN_TITLE") %>
- </title>
- <style type="text/css">
- /* <![CDATA[ */
- body {
- margin: 0;
- padding: 0;
- border: 0;
- padding-top: <%=loginheight%>;
- }
+ <title><%= rb.getString("LOGIN_TITLE")%></title>
- /* ]]> */
- </style>
-
<script>
+ var isModal = true;
+ function displayStatus(){
+ if(window.parent.frames.length > 0){
+ //loaded as modal
+ }else{
+ try{
+ //normal page
+ isModal = false;
+ document.body.style.paddingTop = ((window.innerHeight / 2) - document.getElementById('login-content').offsetHeight) + 'px';
+ //document.getElementById('login-cancel').value = "<< Back";
+ document.getElementById('login-cancel').onclick = function(){self.history.go(-1)};
+ document.getElementById('login-submit').style.right = '';
+ }catch(e){
+ //swallow
+ }
+ }
+ }
function setFocusOnLoginForm()
{
try
@@ -61,21 +62,23 @@
{
}
}
+
</script>
<link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
</head>
-<body onload="setFocusOnLoginForm();">
+<body onload="displayStatus();setFocusOnLoginForm();">
<div class="login-container">
<div class="login-header">
- <h2><%= rb.getString("LOGIN_TITLE") %>
- </h2>
+ <%--text title--%>
+ <%--<h2><%= rb.getString("LOGIN_TITLE") %></h2>--%>
+ <%--img title--%>
+ <img src="/portal-core/images/logo-small-blue.gif" width="118px" height="17px"alt=""/>
</div>
- <div class="login-content">
-
+ <div class="login-content" id="login-content">
<div class="error-message"
style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus") ? "" : "display:none"))%>;">
<%
@@ -110,11 +113,11 @@
<div class="button-container">
<br class="clear"/>
- <input style="<%=paramPresent ? "" : "display:none"%>;" type="button" name="cancel"
+ <input type="button" name="cancel" id="login-cancel"
value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button"
onclick="window.parent.hideContentModal('login-modal');"/>
<br class="clear"/>
- <input style="<%=paramPresent ? "" : "right:10px"%>;" type="submit" name="login"
+ <input type="submit" name="login" id="login-submit"
value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
</div>
<br class="clear"/>
15 years, 2 months
JBoss Portal SVN: r12902 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-27 11:12:59 -0500 (Fri, 27 Feb 2009)
New Revision: 12902
Added:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
Log:
[JBPORTAL-2316] - coordination samples testcase
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-02-27 16:12:59 UTC (rev 12902)
@@ -0,0 +1,280 @@
+package org.jboss.portal.test.selenium.portal;
+
+import java.text.MessageFormat;
+
+import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class PageCoordinationTestCase extends JBossPortalSeleniumTestCase {
+ private final String INP_ALIAS_REN = "//input[contains(@name,'renameForm:newName')]";
+ private final String SUB_ALIAS_RENAME_SUBMIT = "//input[contains(@name,'renameForm:j_id35')]";
+ private final String SUB_ALIAS_REN_CANCEL = "//input[contains(@name,'renameForm:j_id36')]";
+ private final String TBL_ALIASES = "//div[@id='aliasBindings']/form/div/table";
+ private final String LNK_T_ALIAS_RENAME = "//div[@id=''aliasBindings'']/form[2]/div/table/tbody/tr[{0}]/td[2]/table/tbody/tr/td[1]/a/span";
+ private final String LNK_T_ALIAS_DELETE = "//div[@id=''aliasBindings'']/form[2]/div/table/tbody/tr[{0}]/td[2]/table/tbody/tr/td[2]/a/span";
+ private final String SUB_ALIAS_DEL_SUBMIT = "_jbpnsAdminPortletWindowsnpbj:j_id47:j_id34:j_id40:j_id41";
+ private final String SUB_ALIAS_DEL_CANCEL = "_jbpnsAdminPortletWindowsnpbj:j_id47:j_id34:j_id40:j_id42";
+ private final String CHK_EXPL_WIR = "//input[contains(@id,'useExplicitEvents')]";
+ private final String CHK_PARAM_BIND = "//input[contains(@id,'useExplicitBinding')]";
+ private final String SUB_CREATE_ALIAS = "//input[contains(@name,'create-alias-form') and @type='submit'][1]";
+ private final String SUB_CREATE_ALIAS_CANCEL = "//input[contains(@name,'create-alias-form') and @type='submit'][2]";
+ private final String INP_ALIAS_NAME = "//input[contains(@id,'create-alias-form:aliasName')]";
+ private final String LIS_RENDER_PAR = "//select[contains(@id,'create-alias-form:alias')]";
+
+ public final String casePfx = "portal.admin.";
+
+ private final String LNK_PP_PROP_DELETE = getProp(casePfx+"lnk.pp.prop.delete","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
+ private final String SUB_PP_PROPVAL_UPDATE = getProp(casePfx+"sub.pp.propval.update","//input[contains(@id,'common-manage-prop-form:update')]");
+ private final String INP_PP_PROP_VAL = getProp(casePfx+"inp.pp.prop.val","//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
+ private final String SUB_PPA_FORM_UPDATE = getProp(casePfx+"sub.ppa.form.update","//input[contains(@id,'common-edit-page-error-form:update')]");
+ private final String INP_PPA_RES_SELECT = getProp(casePfx+"inp.ppa.res.select","//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
+ private final String SEL_PPA_NF_SELECT = getProp(casePfx+"sel.ppa.nf.select","//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
+ private final String SEL_PPA_INTERNAL_SELECT = getProp(casePfx+"sel.ppa.internal.select","//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
+ private final String SEL_PPA_ERROR_SELECT = getProp(casePfx+"sel.ppa.error.select","//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
+ private final String SEL_PPA_CONTROL_SELECT = getProp(casePfx+"sel.ppa.control.select","//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
+ private final String SEL_PPA_ACCESS_SELECT = getProp(casePfx+"sel.ppa.access.select","//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
+ private final String CHK_PPA_RES_CHECK = getProp(casePfx+"chk.ppa.res.check","//input[contains(@id,'common-edit-page-error-form:page-res-check')]");
+ private final String CHK_PPA_NF_CHECK = getProp(casePfx+"chk.ppa.nf.check","//input[contains(@id,'common-edit-page-error-form:page-not-found-check')]");
+ private final String CHK_PPA_INTERNAL_CHECK = getProp(casePfx+"chk.ppa.internal.check","//input[contains(@id,'common-edit-page-error-form:page-internal-check')]");
+ private final String CHK_PPA_ERROR_CHECK = getProp(casePfx+"chk.ppa.error.check","//input[contains(@id,'common-edit-page-error-form:page-error-check')]");
+ private final String CHK_PPA_CONTROL_CHECK = getProp(casePfx+"chk.ppa.control.check","//input[contains(@id,'common-edit-page-error-form:page-control-check')]");
+ private final String CHK_PPA_ACCESS_CHECK = getProp(casePfx+"chk.ppa.access.check","//input[contains(@id,'common-edit-page-error-form:page-access-check')]");
+ private final String SUB_PP_ERROR_FORM_UPDATE = getProp(casePfx+"sub.pp.error.form.update","//input[contains(@id,'common-edit-portal-error-form:update')]");
+ private final String INP_PP_RES_INPUT = getProp(casePfx+"inp.pp.res.input","//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
+ private final String SEL_PP_NF_SELECT = getProp(casePfx+"sel.pp.nf.select","//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
+ private final String SEL_PP_INTERNAL_SELECT = getProp(casePfx+"sel.pp.internal.select","//select[contains(@id,'common-edit-portal-error-form:portal-internal-select')]");
+ private final String SEL_PP_ERROR_SELECT = getProp(casePfx+"sel.pp.error.select","//select[contains(@id,'common-edit-portal-error-form:portal-error-select')]");
+ private final String SEL_PP_UNAVAIL_SELECT = getProp(casePfx+"sel.pp.unavail.select","//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
+ private final String SEL_PP_ACCESS_SELECT = getProp(casePfx+"sel.pp.access.select","//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
+ private final String CHK_PP_RES_CHECK = getProp(casePfx+"chk.pp.res.check","//input[contains(@id,'common-edit-portal-error-form:portal-res-check')]");
+ private final String CHK_PP_NF_CHECK = getProp(casePfx+"chk.pp.nf.check","//input[contains(@id,'common-edit-portal-error-form:portal-not-found-check')]");
+ private final String CHK_PP_INTERNAL_CHECK = getProp(casePfx+"chk.pp.internal.check","//input[contains(@id,'common-edit-portal-error-form:portal-internal-check')]");
+ private final String CHK_PP_ERROR_CHECK = getProp(casePfx+"chk.pp.error.check","//input[contains(@id,'common-edit-portal-error-form:portal-error-check')]");
+ private final String CHK_PP_ACCESS_CHECK = getProp(casePfx+"chk.pp.access.check","//input[contains(@id,'common-edit-portal-error-form:portal-access-check')]");
+ private final String CHK_PP_UNAVAIL_CHECK = getProp(casePfx+"chk.pp.unavail.check","//input[contains(@id,'common-edit-portal-error-form:portal-unavail-check')]");
+ private final String SUB_PP_PROPADD = getProp(casePfx+"sub.pp.propadd","//input[contains(@id,'common-edit-prop-form:add-property')]");
+ private final String INP_PP_PROPNAME = getProp(casePfx+"inp.pp.propname","//input[contains(@id,'common-edit-prop-form:property')]");
+ private final String SUB_PP_LISTENER = getProp(casePfx+"sub.pp.listener","//input[contains(@id,'edit-prop-form:update')]");
+ private final String SEL_PP_LISTENER = getProp(casePfx+"sel.pp.listener","//select[contains(@id,'edit-prop-form:listener')]");
+ private final String TBL_PP_PROPS = getProp(casePfx+"tbl.pp.props","//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
+
+ private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
+ private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
+ private final String SUBMIT_RENAME_PORTAL = getProp(casePfx + "submit.rename.portal", "//input[contains(@id,'renameForm:rename')]");
+ private final String INPUT_RENAME_PORTAL = getProp(casePfx + "input.rename.portal", "//input[contains(@id,'renameForm:newName')]");
+ private final String SUBMIT_DELETE_PORTAL_CONF = getProp(casePfx + "submit.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
+ private final String INPUT_SUBMIT_PAGECREATE = getProp(casePfx + "input.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
+ private final String INPUT_PAGENAME = getProp(casePfx + "input.pagename", "//input[contains(@id,'create-page-form:pageName')]");
+ private final String INPUT_PORTALNAME = getProp(casePfx + "input.portalname", "//input[contains(@id,'create-portal-form:name')]");
+ private final String INPUT_SUBMIT_CREATEPORTAL = getProp(casePfx + "input.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
+ private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
+ private final String LINK_PORTALS_ID = getProp(casePfx + "link.portals.id", "link=*Portal Objects*");
+ private final String LINK_PORTAL_HOME = getProp(casePfx + "link.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+ private final String TABLE_PORTAL_ADMIN = getProp(casePfx + "table.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+ private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+ private final String POR_TL_SECURITY = getProp(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
+ private final String POR_TL_PROPERTIES = getProp(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
+ private final String POR_TL_THEME = getProp(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
+ private final String POR_TL_RENAME = getProp(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
+ private final String POR_TL_DELETE = getProp(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
+ private final String POR_TL_MAKEDEF = getProp(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
+ private final String TABLE_PORTALPAGE_ADMIN = getProp(casePfx + "table.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+ private final String PAG_TL_MAIN = getProp(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
+ private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+ private final String PAG_TL_SECURITY = getProp(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
+ private final String PAG_TL_PROPERTIES = getProp(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
+ private final String PAG_TL_COORDINATION = getProp(casePfx + "pag.tl.coord", "//a[contains(@id,''pages-datatable:{0}:edit-coord'')]");
+ private final String PAG_TL_THEME = getProp(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
+ private final String PAG_TL_RENAME = getProp(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
+ private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
+ private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
+ private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
+
+ @BeforeMethod(groups = { "log" })
+ public void loginBeforeTest() {
+ logoutIfPossible();
+ login("admin", "admin");
+ }
+
+ @AfterMethod(groups = { "log" })
+ public void logoutAfterTest() {
+ }
+
+ @Test(enabled = true)
+ public void testPageCoordination(){
+ String portalName = "default";
+ String pageName = "Coordination Samples";
+
+ openAndWait("/portal");
+ clickAndWait("link=Admin");
+
+ clickIfVisible(TAB_PORTALOBJ_ID);
+ clickIfVisible(LINK_PORTALS_ID);
+ clickIfVisible(LINK_PORTAL_HOME);
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+ r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+
+ // create alias
+ selenium.addSelection(LIS_RENDER_PAR, "label=zipcode");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(INP_ALIAS_NAME, "aliasBindTest");
+ selenium.click(SUB_CREATE_ALIAS_CANCEL);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ selenium.addSelection(LIS_RENDER_PAR, "label=zipcode");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(INP_ALIAS_NAME, "aliasBindTest");
+ selenium.click(SUB_CREATE_ALIAS);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ }
+
+ @Test(enabled = true)
+ public void testDeleteAlias(){
+ String portalName = "default";
+ String pageName = "Coordination Samples";
+
+ openAndWait("/portal");
+ clickAndWait("link=Admin");
+
+ clickIfVisible(TAB_PORTALOBJ_ID);
+ clickIfVisible(LINK_PORTALS_ID);
+ clickIfVisible(LINK_PORTAL_HOME);
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+ r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+
+ // create delete alias
+ selenium.addSelection(LIS_RENDER_PAR, "label={urn:jboss:portal:samples:coor}zipcode");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(INP_ALIAS_NAME, "aliasBindDelete");
+
+ selenium.click(SUB_CREATE_ALIAS);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ // delete alias
+ r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0) ;
+
+ selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.click(SUB_ALIAS_DEL_CANCEL);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0) ;
+
+ selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.click(SUB_ALIAS_DEL_SUBMIT);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
+ @Test(enabled = true)
+ public void testRenameAlias(){
+ String portalName = "default";
+ String pageName = "Coordination Samples";
+
+ openAndWait("/portal");
+ clickAndWait("link=Admin");
+
+ clickIfVisible(TAB_PORTALOBJ_ID);
+ clickIfVisible(LINK_PORTALS_ID);
+ clickIfVisible(LINK_PORTAL_HOME);
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+ r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+
+ // create rename alias
+ selenium.addSelection(LIS_RENDER_PAR, "label={urn:jboss:portal:samples:coor}zipcode");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(INP_ALIAS_NAME, "aliasBingRename");
+
+ selenium.click(SUB_CREATE_ALIAS);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ // rename alias
+ r = findTableRow(TBL_ALIASES, "aliasBingRename", 0) ;
+
+ selenium.click(MessageFormat.format(LNK_T_ALIAS_RENAME,r));
+
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.click(SUB_ALIAS_REN_CANCEL);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ r = findTableRow(TBL_ALIASES, "aliasBingRename", 0) ;
+
+ selenium.click(MessageFormat.format(LNK_T_ALIAS_RENAME,r));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(INP_ALIAS_REN, "aliasBindWasRenamed");
+ selenium.click(SUB_ALIAS_RENAME_SUBMIT);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
+ @Test(enabled = true)
+ public void testParamBinding(){
+ String portalName = "default";
+ String pageName = "Coordination Samples";
+
+ openAndWait("/portal");
+ clickAndWait("link=Admin");
+
+ clickIfVisible(TAB_PORTALOBJ_ID);
+ clickIfVisible(LINK_PORTALS_ID);
+ clickIfVisible(LINK_PORTAL_HOME);
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+ r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+
+ // parameter binding
+ selenium.click(CHK_PARAM_BIND);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
+ @Test(enabled = true)
+ public void testExplicitWiring(){
+ String portalName = "default";
+ String pageName = "Coordination Samples";
+
+ openAndWait("/portal");
+ clickAndWait("link=Admin");
+
+ clickIfVisible(TAB_PORTALOBJ_ID);
+ clickIfVisible(LINK_PORTALS_ID);
+ clickIfVisible(LINK_PORTAL_HOME);
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+ r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+ clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+
+ // explicit wiring
+ selenium.click(CHK_EXPL_WIR);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+}
15 years, 2 months
JBoss Portal SVN: r12901 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-27 05:46:35 -0500 (Fri, 27 Feb 2009)
New Revision: 12901
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
Log:
selenium - archive upload testcase hack
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-02-26 16:15:23 UTC (rev 12900)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-02-27 10:46:35 UTC (rev 12901)
@@ -13,8 +13,8 @@
@Test(groups = { "cms_archive_upload" }, enabled = true)
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
- private static final Integer ARCHIVE_WAITING = 10000;
- private static final int n = 30;
+ private static final Integer ARCHIVE_WAITING = 5000;
+ private static final int n = 50;
/*
* uncomment following lines and set the right path to the workspace in the
* case you want to use this test case locally from eclipse
@@ -41,7 +41,7 @@
logoutIfPossible();
login("admin", "admin");
// timeout hack
- //selenium.setSpeed("10000");
+ selenium.setSpeed("10000");
}
@AfterMethod(groups = { "log" })
15 years, 2 months
JBoss Portal SVN: r12900 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-02-26 11:15:23 -0500 (Thu, 26 Feb 2009)
New Revision: 12900
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
Log:
- Should fix tests.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-02-26 15:40:18 UTC (rev 12899)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-02-26 16:15:23 UTC (rev 12900)
@@ -99,10 +99,12 @@
public void testGetChild()
{
+ TransactionAssert.beginTransaction();
PortalObject child = p_1_1.getChild("w1");
assertNotNull(child);
assertEquals("w1", child.getName());
assertEquals(p_1_1, child.getParent());
+ TransactionAssert.commitTransaction();
}
public void testIterator() throws NoSuchPortalObjectException, DuplicatePortalObjectException
15 years, 2 months
JBoss Portal SVN: r12899 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-26 10:40:18 -0500 (Thu, 26 Feb 2009)
New Revision: 12899
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
Log:
selenium - some code tweaks
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-02-26 13:18:28 UTC (rev 12898)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-02-26 15:40:18 UTC (rev 12899)
@@ -13,8 +13,8 @@
@Test(groups = { "cms_archive_upload" }, enabled = true)
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
- private static final Integer ARCHIVE_WAITING = 30000;
- private static final int n = 10;
+ private static final Integer ARCHIVE_WAITING = 10000;
+ private static final int n = 30;
/*
* uncomment following lines and set the right path to the workspace in the
* case you want to use this test case locally from eclipse
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-02-26 13:18:28 UTC (rev 12898)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-02-26 15:40:18 UTC (rev 12899)
@@ -46,7 +46,7 @@
public final String LNK_USERTAB = getProp(caseIPfx + "lnk.usertab", "//a[contains(@id,'role-temp-form:manage-users')]");
public final String LNK_USERMAIN = getProp(caseIPfx + "lnk.usermain", "//a[contains(@id,'user-temp-form1:user-adm-link')]");
public final String LNK_USERMANG_MAIN = getProp(caseIPfx + "lnk.usermang.main", "//a[contains(@id,'user-temp-form1:assign-role-link')]");
- public final String SUB_SEARCH_USER = getProp(caseIPfx + "sub.search.user", "//input[contains(@id,'search-user-form:search')]");
+ public final String SUB_SEARCH_USER = getProp(caseIPfx + "sub.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
public final String INP_SEARCH_USER = getProp(caseIPfx + "inp.search.user", "//input[contains(@id,'search-user-form:searchString')]");
public final String LNK_SEARCH_USER = getProp(caseIPfx + "lnk.search.user", "//a[contains(@id,'user-form:search-user-link')]");
public final String TBL_USERLIST = getProp(caseIPfx + "tbl.userlist", "//table[contains(@id,'search-user-form1:userlist')]");
@@ -209,7 +209,7 @@
}
- @Test(enabled = true, dependsOnMethods = { "testSetRoleReadPer2" }, description = "Set admin/secRole read permissions, login as user w secRole.")
+ @Test(enabled = true, description = "Set admin/secRole read permissions, login as user w secRole.")
public void testSetRoleReadPer1() {
login("admin", "admin");
@@ -244,7 +244,7 @@
}
- @Test(enabled = true, description = "Set admin/secRole read permissions, login as user w/o secRole.")
+ @Test(enabled = true, dependsOnMethods = { "testSetRoleReadPer1" }, description = "Set admin/secRole read permissions, login as user w/o secRole.")
public void testSetRoleReadPer2() {
login("admin", "admin");
@@ -412,12 +412,13 @@
selenium.click(LNK_SEARCH_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ //selenium.setSpeed("5000");
selenium.type(INP_SEARCH_USER, username);
+ //System.out.println(SUB_SEARCH_USER);
selenium.click(SUB_SEARCH_USER);
try {
- Thread.sleep(5000);
+ Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -425,6 +426,7 @@
Assert.assertTrue(selenium.isTextPresent(username), "Username was not found.");
Assert.assertTrue(selenium.isTextPresent(email), "User email adress was not found.");
+ //selenium.setSpeed("0");
}
private String butUsrRol_id(String userName) {
15 years, 2 months
JBoss Portal SVN: r12898 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/model/portal and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-02-26 08:18:28 -0500 (Thu, 26 Feb 2009)
New Revision: 12898
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
Log:
- JBPORTAL-2040:
+ Re-wrote PortalObject.getChild to use container directly instead of going through ObjectNode.getChildren
to avoid having to retrieve all the children just to get one. This should yield a massive reduction in DB
requests.
+ Removed unused instances and pages SelectedItems in PortalObjectManagerBean
- Added PortalObjectId.getChildId to efficiently get a child's id from a parent and use ParameterValidation.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-02-26 13:07:23 UTC (rev 12897)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-02-26 13:18:28 UTC (rev 12898)
@@ -88,7 +88,7 @@
public PortalObjectImpl(boolean initState)
{
- this.declaredPropertyMap = new HashMap();
+ this.declaredPropertyMap = new HashMap<String, String>();
this.listener = null;
//
@@ -408,17 +408,18 @@
public PortalObject getChild(String name)
{
- ParameterValidation.throwIllegalArgExceptionIfNull(name, "child name");
- ObjectNode childNode = (ObjectNode)objectNode.getChildren().get(name);
- if (childNode != null)
+ if (name == null)
{
- PortalObjectImpl childObject = childNode.getObject();
+ throw new IllegalArgumentException();
+ }
- // Track it
- getAccessedChildren().add(childObject);
-
- //
- return childObject;
+ // use container directly instead of going through children to avoid having to retrieve all of them just for one
+ // this leads to major perfomance improvement by dramatically reducing the number of DB requests
+ PortalObject portalObject = objectNode.getContext().getContainer().getObject(getId().getChildId(name));
+ if (portalObject != null)
+ {
+ getAccessedChildren().add(portalObject);
+ return portalObject;
}
else
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-02-26 13:07:23 UTC (rev 12897)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-02-26 13:18:28 UTC (rev 12898)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
+import org.jboss.portal.common.util.ParameterValidation;
+
import java.io.Serializable;
/**
@@ -60,14 +62,8 @@
*/
public PortalObjectId(String namespace, PortalObjectPath path) throws IllegalArgumentException
{
- if (namespace == null)
- {
- throw new IllegalArgumentException();
- }
- if (path == null)
- {
- throw new IllegalArgumentException();
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(namespace, "namespace");
+ ParameterValidation.throwIllegalArgExceptionIfNull(path, "path");
this.namespace = namespace;
this.path = path;
}
@@ -125,10 +121,7 @@
*/
public static PortalObjectId parse(String idValue, PortalObjectPath.Format format) throws IllegalArgumentException
{
- if (idValue == null)
- {
- throw new IllegalArgumentException("No null id value accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(idValue, "id");
int pos = idValue.indexOf(NAMESPACE_SEPARATOR);
//
@@ -144,6 +137,12 @@
}
}
+ public PortalObjectId getChildId(String name)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(name, "child name");
+ return new PortalObjectId(getNamespace(), getPath().getChild(name));
+ }
+
/**
* Parse a portal object id given the namespace and the path string representation.
*
@@ -177,10 +176,7 @@
*/
public String toString(PortalObjectPath.Format format) throws IllegalArgumentException
{
- if (format == null)
- {
- throw new IllegalArgumentException("No null format accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(format, "format");
//
if (format == PortalObjectPath.LEGACY_FORMAT)
@@ -216,14 +212,8 @@
*/
public static String toString(String namespace, PortalObjectPath path, PortalObjectPath.Format format) throws IllegalArgumentException
{
- if (namespace == null)
- {
- throw new IllegalArgumentException("No null namespace accepted");
- }
- if (path == null)
- {
- throw new IllegalArgumentException("No null path accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(namespace, "namespace");
+ ParameterValidation.throwIllegalArgExceptionIfNull(path, "path");
if (namespace.length() > 0)
{
return namespace + NAMESPACE_SEPARATOR + path.toString(format);
@@ -240,4 +230,4 @@
int order = namespace.compareTo(that.namespace);
return order != 0 ? order : path.compareTo(that.path);
}
-}
+}
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-02-26 13:07:23 UTC (rev 12897)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-02-26 13:18:28 UTC (rev 12898)
@@ -36,7 +36,6 @@
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.ContentProvider;
import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
-import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
@@ -66,7 +65,6 @@
import javax.xml.namespace.QName;
import java.io.Serializable;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
@@ -141,12 +139,6 @@
private final AuthorizationBean auth = new PortalObjectAuthorizationBean();
/** . */
- private SelectItem[] instanceItems;
-
- /** . */
- private SelectItem[] portalPageItems;
-
- /** . */
private List selectedObjectPath;
/** . */
@@ -368,16 +360,6 @@
return auth;
}
- public SelectItem[] getInstanceItems()
- {
- return instanceItems;
- }
-
- public SelectItem[] getPortalPageItems()
- {
- return portalPageItems;
- }
-
public List getSelectedObjectPath()
{
return selectedObjectPath;
@@ -653,8 +635,6 @@
public void refresh()
{
propertyAction = null;
- instanceItems = null;
- portalPageItems = null;
selectedObjectPath = null;
selectedObject = null;
selectedProperties = null;
@@ -693,18 +673,6 @@
//
theme = new ThemeBean(selectedObject);
- //
- Collection<PortalObject> pages = getSelectedObject().getChildren(PortalObject.PAGE_MASK);
- ArrayList<SelectItem> list = new ArrayList<SelectItem>(pages.size() + 1);
- for (PortalObject page : pages)
- {
- SelectItem item = new SelectItem(page.getName());
- list.add(item);
- }
- list.add(new SelectItem("", "no selection"));
- portalPageItems = list.toArray(new SelectItem[list.size()]);
-
- //
PortalObject o = getSelectedObject();
ArrayList<PortalObject> path = new ArrayList<PortalObject>();
while (o != null)
@@ -714,17 +682,6 @@
}
Collections.reverse(path);
selectedObjectPath = path;
-
- // rather dirty code...
- List tmp = new ArrayList(instanceContainer.getDefinitions());
- Collections.sort(tmp, InstanceManagerBean.INSTANCE_COMPARATOR);
- for (int i = 0; i < tmp.size(); i++)
- {
- Instance instance = (Instance)tmp.get(i);
- SelectItem item = new SelectItem(instance.getId());
- tmp.set(i, item);
- }
- instanceItems = (SelectItem[])tmp.toArray(new SelectItem[tmp.size()]);
}
public void processEvent(ActionEvent event)
15 years, 2 months
JBoss Portal SVN: r12897 - in branches/JBoss_Portal_Branch_2_6: core/src/main/org/jboss/portal/core/model/portal and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-02-26 08:07:23 -0500 (Thu, 26 Feb 2009)
New Revision: 12897
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
Log:
- JBPORTAL-2040:
+ Re-wrote PortalObject.getChild to use container directly instead of going through ObjectNode.getChildren
to avoid having to retrieve all the children just to get one. This should yield a massive reduction in DB
requests.
+ Removed unused instances and pages SelectedItems in PortalObjectManagerBean
- Added PortalObjectId.getChildId to efficiently get a child's id from a parent and use ParameterValidation.
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-02-26 11:58:51 UTC (rev 12896)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-02-26 13:07:23 UTC (rev 12897)
@@ -411,16 +411,14 @@
{
throw new IllegalArgumentException();
}
- ObjectNode childNode = (ObjectNode)objectNode.getChildren().get(name);
- if (childNode != null)
- {
- PortalObjectImpl childObject = childNode.getObject();
- // Track it
- getAccessedChildren().add(childObject);
-
- //
- return childObject;
+ // use container directly instead of going through children to avoid having to retrieve all of them just for one
+ // this leads to major perfomance improvement by dramatically reducing the number of DB requests
+ PortalObject portalObject = objectNode.getContext().getContainer().getObject(getId().getChildId(name));
+ if (portalObject != null)
+ {
+ getAccessedChildren().add(portalObject);
+ return portalObject;
}
else
{
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-02-26 11:58:51 UTC (rev 12896)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-02-26 13:07:23 UTC (rev 12897)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
+import org.jboss.portal.common.util.ParameterValidation;
+
import java.io.Serializable;
/**
@@ -60,14 +62,8 @@
*/
public PortalObjectId(String namespace, PortalObjectPath path) throws IllegalArgumentException
{
- if (namespace == null)
- {
- throw new IllegalArgumentException();
- }
- if (path == null)
- {
- throw new IllegalArgumentException();
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(namespace, "namespace");
+ ParameterValidation.throwIllegalArgExceptionIfNull(path, "path");
this.namespace = namespace;
this.path = path;
}
@@ -125,10 +121,7 @@
*/
public static PortalObjectId parse(String idValue, PortalObjectPath.Format format) throws IllegalArgumentException
{
- if (idValue == null)
- {
- throw new IllegalArgumentException("No null id value accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(idValue, "id");
int pos = idValue.indexOf(NAMESPACE_SEPARATOR);
//
@@ -144,6 +137,12 @@
}
}
+ public PortalObjectId getChildId(String name)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(name, "child name");
+ return new PortalObjectId(getNamespace(), getPath().getChild(name));
+ }
+
/**
* Parse a portal object id given the namespace and the path string representation.
*
@@ -177,10 +176,7 @@
*/
public String toString(PortalObjectPath.Format format) throws IllegalArgumentException
{
- if (format == null)
- {
- throw new IllegalArgumentException("No null format accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(format, "format");
//
if (format == PortalObjectPath.LEGACY_FORMAT)
@@ -216,14 +212,8 @@
*/
public static String toString(String namespace, PortalObjectPath path, PortalObjectPath.Format format) throws IllegalArgumentException
{
- if (namespace == null)
- {
- throw new IllegalArgumentException("No null namespace accepted");
- }
- if (path == null)
- {
- throw new IllegalArgumentException("No null path accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(namespace, "namespace");
+ ParameterValidation.throwIllegalArgExceptionIfNull(path, "path");
if (namespace.length() > 0)
{
return namespace + NAMESPACE_SEPARATOR + path.toString(format);
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-02-26 11:58:51 UTC (rev 12896)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-02-26 13:07:23 UTC (rev 12897)
@@ -22,23 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
-import javax.faces.model.SelectItem;
-
import org.jboss.portal.core.admin.ui.actions.AddPageAction;
import org.jboss.portal.core.admin.ui.actions.PropertyAction;
import org.jboss.portal.core.admin.ui.common.PageManagerBean;
@@ -49,7 +32,6 @@
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.ContentProvider;
import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
-import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
@@ -67,6 +49,21 @@
import org.jboss.portal.theme.LayoutService;
import org.jboss.portal.theme.ThemeService;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.model.SelectItem;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.Set;
+
/** The portal object manager bean. */
public class PortalObjectManagerBean implements Serializable, AddPageAction.Listener
{
@@ -131,12 +128,6 @@
private final AuthorizationBean auth = new PortalObjectAuthorizationBean();
/** . */
- private SelectItem[] instanceItems;
-
- /** . */
- private SelectItem[] portalPageItems;
-
- /** . */
private List selectedObjectPath;
/** . */
@@ -348,16 +339,6 @@
return auth;
}
- public SelectItem[] getInstanceItems()
- {
- return instanceItems;
- }
-
- public SelectItem[] getPortalPageItems()
- {
- return portalPageItems;
- }
-
public List getSelectedObjectPath()
{
return selectedObjectPath;
@@ -539,7 +520,7 @@
Map pmap = getRequestParameterMap();
selectedPlugin = (String)pmap.get("plugin");
}
-
+
public Map getRequestParameterMap()
{
return FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
@@ -595,7 +576,7 @@
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, stringMessage, stringMessage);
FacesContext.getCurrentInstance().addMessage("status", message);
-
+
selectedDeletingObject = null;
}
else
@@ -616,8 +597,6 @@
public void refresh()
{
propertyAction = null;
- instanceItems = null;
- portalPageItems = null;
selectedObjectPath = null;
selectedObject = null;
selectedProperties = null;
@@ -652,18 +631,6 @@
theme = new ThemeBean(selectedObject);
//
- Collection pages = getSelectedObject().getChildren(PortalObject.PAGE_MASK);
- ArrayList list = new ArrayList(pages.size() + 1);
- for (Iterator iterator = pages.iterator(); iterator.hasNext();)
- {
- PortalObject o = (PortalObject)iterator.next();
- SelectItem item = new SelectItem(o.getName());
- list.add(item);
- }
- list.add(new SelectItem("", "no selection"));
- portalPageItems = (SelectItem[])list.toArray(new SelectItem[list.size()]);
-
- //
PortalObject o = getSelectedObject();
ArrayList path = new ArrayList();
while (o != null)
@@ -673,17 +640,6 @@
}
Collections.reverse(path);
selectedObjectPath = path;
-
- //
- List tmp = new ArrayList(instanceContainer.getDefinitions());
- Collections.sort(tmp, InstanceManagerBean.INSTANCE_COMPARATOR);
- for (int i = 0; i < tmp.size(); i++)
- {
- Instance instance = (Instance)tmp.get(i);
- SelectItem item = new SelectItem(instance.getId());
- tmp.set(i, item);
- }
- instanceItems = (SelectItem[])tmp.toArray(new SelectItem[tmp.size()]);
}
public void processEvent(ActionEvent event)
15 years, 2 months
JBoss Portal SVN: r12896 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-26 06:58:51 -0500 (Thu, 26 Feb 2009)
New Revision: 12896
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
Log:
selenium - longer archive waiting
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-02-26 11:55:52 UTC (rev 12895)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-02-26 11:58:51 UTC (rev 12896)
@@ -13,7 +13,7 @@
@Test(groups = { "cms_archive_upload" }, enabled = true)
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
- private static final Integer ARCHIVE_WAITING = 10000;
+ private static final Integer ARCHIVE_WAITING = 30000;
private static final int n = 10;
/*
* uncomment following lines and set the right path to the workspace in the
15 years, 2 months