JBoss Portal SVN: r13028 - branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-03-13 09:36:38 -0400 (Fri, 13 Mar 2009)
New Revision: 13028
Modified:
branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/dyna.js
branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/prototype.js
Log:
JBEPP-42: Several submit buttons in a form don't work with partial refresh enabled
Modified: branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/dyna.js
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/dyna.js 2009-03-13 13:10:04 UTC (rev 13027)
+++ branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/dyna.js 2009-03-13 13:36:38 UTC (rev 13028)
@@ -1,4 +1,30 @@
-function sendData(action, windowId, fromPos, fromRegionId, toPos, toRegionId) {
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * 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. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+var currentSubmit;
+
+function sendData(action, windowId, fromPos, fromRegionId, toPos, toRegionId)
+{
var options = {
requestHeaders: ["ajax","true","bilto","toto"],
method: "post",
@@ -17,7 +43,7 @@
onLoading: function(t)
{
}
- }
+ };
new Ajax.Request(server_base_url + "/ajax", options);
}
@@ -78,6 +104,11 @@
var source = Event.element(event);
var container = Element.up(source, "div.dyna-window");
+ //attach onclick observer to all submit buttons
+ $$('input[type=submit]').invoke('observe', 'click', function(e) {
+ currentSubmit = e.findElement();
+ });
+
// We found the window
if (container != null) {
@@ -123,7 +154,6 @@
// Check we can handle this URL
if (isURLAccepted(current.action)) {
-
// Set URL
url = current.action;
@@ -131,7 +161,7 @@
options.enctype = enctype;
options.asynchronous = false;
options.method = "post"
- options.postBody = Form.serialize(current);
+ options.postBody = Form.serialize(current,'',currentSubmit);
}
}
}
Modified: branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/prototype.js
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/prototype.js 2009-03-13 13:10:04 UTC (rev 13027)
+++ branches/Enterprise_Portal_Platform_4_3/theme/src/bin/portal-ajax-war/dyna/prototype.js 2009-03-13 13:36:38 UTC (rev 13028)
@@ -2609,7 +2609,9 @@
"FORM": Object.clone(Form.Methods),
"INPUT": Object.clone(Form.Element.Methods),
"SELECT": Object.clone(Form.Element.Methods),
- "TEXTAREA": Object.clone(Form.Element.Methods)
+ "TEXTAREA": Object.clone(Form.Element.Methods),
+ //[SERIALIZE_ERROR]
+ "BUTTON": Object.clone(Form.Element.Methods)
});
}
@@ -3475,8 +3477,21 @@
};
Form.Methods = {
- serialize: function(form, options) {
- return Form.serializeElements(Form.getElements(form), options);
+ serialize: function(form, options, buttonPressed) {
+ //[SERIALIZE_ERROR] Implements additional functionality to support <button> and ensure other button-type
+ // <inputs> are not serialized
+ var elements = Form.getElements(form);
+ if (buttonPressed) {
+ elements = elements.findAll(
+ function(element) {
+ return element == $(buttonPressed) ||
+ (element.tagName.toLowerCase() != "button" &&
+ (element.tagName.toLowerCase() != "input" ||
+ (element.type != "submit" && element.type != "button" && element.type != "image" && element.type != "reset")));
+ }
+ );
+ };
+ return Form.serializeElements(elements, options);
},
getElements: function(form) {
@@ -3657,6 +3672,11 @@
else element.value = value;
},
+ //[SERIALIZE_ERROR]
+ button: function(element) {
+ return element.value;
+ },
+
select: function(element, value) {
if (Object.isUndefined(value))
return this[element.type == 'select-one' ?
17 years, 1 month
JBoss Portal SVN: r13027 - branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-03-13 09:10:04 -0400 (Fri, 13 Mar 2009)
New Revision: 13027
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
Log:
JBEPP-41: Portal admin portlet / Dashboard configuration can be slow with many objects/dasboards
Modified: branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-03-13 13:04:17 UTC (rev 13026)
+++ branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-03-13 13:10:04 UTC (rev 13027)
@@ -35,7 +35,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;
@@ -64,7 +63,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;
@@ -139,12 +137,6 @@
private final AuthorizationBean auth = new PortalObjectAuthorizationBean();
/** . */
- private SelectItem[] instanceItems;
-
- /** . */
- private SelectItem[] portalPageItems;
-
- /** . */
private List selectedObjectPath;
/** . */
@@ -366,16 +358,6 @@
return auth;
}
- public SelectItem[] getInstanceItems()
- {
- return instanceItems;
- }
-
- public SelectItem[] getPortalPageItems()
- {
- return portalPageItems;
- }
-
public List getSelectedObjectPath()
{
return selectedObjectPath;
@@ -651,8 +633,6 @@
public void refresh()
{
propertyAction = null;
- instanceItems = null;
- portalPageItems = null;
selectedObjectPath = null;
selectedObject = null;
selectedProperties = null;
@@ -686,18 +666,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)
@@ -707,17 +675,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)
17 years, 1 month
JBoss Portal SVN: r13026 - in branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core: model/portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-03-13 09:04:17 -0400 (Fri, 13 Mar 2009)
New Revision: 13026
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
Log:
JBEPP-40: Performance degrades as number of portal objects/dashboard increases
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-03-13 12:51:40 UTC (rev 13025)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-03-13 13:04:17 UTC (rev 13026)
@@ -409,16 +409,14 @@
public PortalObject getChild(String name)
{
ParameterValidation.throwIllegalArgExceptionIfNull(name, "child name");
- 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/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-03-13 12:51:40 UTC (rev 13025)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-03-13 13:04:17 UTC (rev 13026)
@@ -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);
17 years, 1 month
JBoss Portal SVN: r13025 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-03-13 08:51:40 -0400 (Fri, 13 Mar 2009)
New Revision: 13025
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
Log:
JBEPP-39: Page parameters updates are not reflected with partial refresh
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-13 11:33:13 UTC (rev 13024)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-13 12:51:40 UTC (rev 13025)
@@ -50,6 +50,7 @@
import org.jboss.portal.core.model.portal.command.response.UpdateWindowResponse;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.model.portal.content.WindowRendition;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateChange;
import org.jboss.portal.core.navstate.NavigationalStateContext;
@@ -229,7 +230,8 @@
NavigationalStateKey key = update.getKey();
// We consider only portal object types
- if (key.getType() == WindowNavigationalState.class)
+ Class type = key.getType();
+ if (type == WindowNavigationalState.class)
{
// Get old window state
WindowNavigationalState oldNS = (WindowNavigationalState)update.getOldValue();
@@ -257,6 +259,11 @@
// Collect the dirty window id
dirtyWindowIds.add(key.getId());
}
+ else if (type == PageNavigationalState.class)
+ {
+ // force full refresh for now...
+ fullRefresh = true;
+ }
}
}
17 years, 1 month
JBoss Portal SVN: r13024 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-03-13 07:33:13 -0400 (Fri, 13 Mar 2009)
New Revision: 13024
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
Log:
JBEPP-38: When using explicit parameters, those parameters aren't passed
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2009-03-13 10:23:21 UTC (rev 13023)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2009-03-13 11:33:13 UTC (rev 13024)
@@ -94,7 +94,9 @@
Map<String, String[]> parameters = new HashMap<String, String[]>(stringMap);
- if (pns != null)
+ parameters.putAll(renderResult.getPublicNavigationalStateUpdates());
+
+ if (pns != null)
{
//
for (ParameterInfo parameterInfo : portletInfo.getNavigation().getPublicParameters())
17 years, 1 month
JBoss Portal SVN: r13023 - in branches/JBoss_Portal_Branch_2_7: core/src/bin/portal-core-war/themes/renewal and 7 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-13 06:23:21 -0400 (Fri, 13 Mar 2009)
New Revision: 13023
Modified:
branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
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/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
Log:
- Updated from 2.7.2
- Slightly modified styles (green instead of red for DnD zones, re-added bigger tab menu with less padding)
- Minor improvements.
Modified: branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2009-03-13 10:23:21 UTC (rev 13023)
@@ -67,7 +67,7 @@
<componentref name="jboss-portal/modules/common" version="1.2.4"/>
<componentref name="jboss-portal/modules/web" version="1.2.3"/>
<componentref name="jboss-portal/modules/test" version="1.0.4"/>
- <componentref name="jboss-portal/modules/portlet" version="2.0.6"/>
+ <componentref name="jboss-portal/modules/portlet" version="2.0.5"/>
<componentref name="jboss-portal/modules/identity" version="1.0.8"/>
<componentref name="jboss-portal/modules/cms" version="1.2.4"/>
<componentref name="antlr" version="2.7.6-brew"/>
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-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-13 10:23:21 UTC (rev 13023)
@@ -237,7 +237,7 @@
bottom: 0px;
left: 0;
min-width: 550px;
- z-index: 10;
+ z-index: 1;
}
* html ul#tabsHeader {
@@ -321,7 +321,6 @@
margin: 0px;
padding: 0px;
margin-top: 28px;
- z-index: 10;
}
ul#tabsHeader ul a {
@@ -481,10 +480,8 @@
/* wrapper for floating portlet window modes */
.portlet-mode-container {
white-space: nowrap;
- float: right;
- padding: 2px 0 0 0;
- /*position: relative;*/
- /*z-index: 1;*/
+ float: right; /*position: relative;*/
+/*z-index: 1;*/
}
.mode-button {
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -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. *
@@ -53,7 +53,7 @@
int toPosInt = Integer.parseInt(toPos);
//
- PortalObjectId tmp = PortalObjectId.parse(windowId, PortalObjectPath.LEGACY_BASE64_FORMAT);
+ PortalObjectId tmp = PortalObjectId.parse(windowId, PortalObjectPath.SAFEST_FORMAT);
//
return new MoveWindowCommand(tmp, fromPosInt, fromRegion, toPosInt, toRegion);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -121,7 +121,7 @@
public HandlerResponse processCommandResponse(
ControllerContext controllerContext,
- ControllerCommand commeand,
+ ControllerCommand command,
ControllerResponse controllerResponse) throws ResponseHandlerException
{
if (controllerResponse instanceof PortletWindowActionResponse)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -20,6 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
+
package org.jboss.portal.core.model.portal;
import org.jboss.portal.common.util.Base64;
@@ -567,4 +568,36 @@
}
}
};
+
+ /** Should only use a-z0-9_ */
+ public static final Format SAFEST_FORMAT = new PortalObjectPath.LegacyFormat()
+ {
+
+ private final String EQUALS = "_e";
+ private final String SLASH = "_s";
+ private final String DOT = "_d";
+ private final String PLUS = "_p";
+
+ @Override
+ public String[] parse(String value)
+ {
+ String uncoded = value.replace(EQUALS, "=");
+ uncoded = uncoded.replace(SLASH, "/");
+ uncoded = uncoded.replace(DOT, ".");
+ uncoded = uncoded.replace(PLUS, "+");
+ return LEGACY_BASE64_FORMAT.parse(uncoded);
+ }
+
+ @Override
+ public String toString(String[] names, int from, int to)
+ {
+ String encoded = LEGACY_BASE64_FORMAT.toString(names, from, to);
+ encoded = encoded.replace("=", EQUALS);
+ encoded = encoded.replace("/", SLASH);
+ encoded = encoded.replace(".", DOT);
+ encoded = encoded.replace("+", PLUS);
+ return encoded;
+ }
+ };
+
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -20,6 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
+
package org.jboss.portal.core.model.portal;
import org.jboss.portal.common.NotYetImplemented;
@@ -55,7 +56,7 @@
public class PortalObjectResponseHandler extends AbstractResponseHandler
{
- public HandlerResponse processCommandResponse(ControllerContext controllerContext, ControllerCommand ceommand, ControllerResponse controllerResponse) throws ResponseHandlerException
+ public HandlerResponse processCommandResponse(ControllerContext controllerContext, ControllerCommand command, ControllerResponse controllerResponse) throws ResponseHandlerException
{
if (controllerResponse instanceof UpdateWindowResponse)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -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. *
@@ -38,21 +38,19 @@
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
-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.identity.User;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.controller.PortletController;
-import org.jboss.portal.portlet.controller.request.PortletActionRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.request.PortletActionRequest;
import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
import org.jboss.portal.portlet.controller.response.PortletResponse;
-import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
+import org.jboss.portal.portlet.info.PortletInfo;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -154,7 +152,7 @@
pageNS
);
}
-
+
public ControllerResponse execute() throws ControllerException
{
try
@@ -186,18 +184,18 @@
if (cr instanceof PageUpdateResponse)
{
- //
- PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
+ //
+ PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
- //
- ControllerPageNavigationalState pageNavigationalState = (ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
+ //
+ ControllerPageNavigationalState pageNavigationalState = (ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
- // Flush all NS
- pageNavigationalState.flushUpdates();
+ // Flush all NS
+ pageNavigationalState.flushUpdates();
}
// Populate the parameters
NavigationalStateContext ctx = (NavigationalStateContext)cpcc.getControllerContext().getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
-
+
PageNavigationalState pns = ctx.getPageNavigationalState(page.getId().toString());
//
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -25,11 +25,11 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.core.controller.ControllerContext;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.content.WindowRendition;
-import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
@@ -84,7 +84,7 @@
//
return new WindowContext(
- PortletUtils.generateNamespaceFrom(window.getId().toString()),
+ window.getId().toString(PortalObjectPath.SAFEST_FORMAT),
region,
order,
windowResult);
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-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -164,7 +164,7 @@
page = portal.createPage("page");
int nbPages = 200;
int nbWindows = 100;
- for(int j = 0; j < nbPages; j++)
+ for (int j = 0; j < nbPages; j++)
{
page.createPage("page" + j);
}
@@ -198,10 +198,10 @@
int nbPortals = 5;
int nbPages = 20;
int nbWindows = 20;
- for(int i = 0; i < nbPortals; i++)
+ for (int i = 0; i < nbPortals; i++)
{
portal = root.createPortal("p" + i);
- for(int j = 0; j < nbPages; j++)
+ for (int j = 0; j < nbPages; j++)
{
String name = "p" + i + "pa" + j;
page = portal.createPage(name);
@@ -218,24 +218,28 @@
time = System.currentTimeMillis();
- int portalIndex = (int) (nbPortals * Math.random());
+ int portalIndex = (int)(nbPortals * Math.random());
assertEquals(nbPortals, root.getChildren().size());
assertEquals(nbPortals, root.getChildren(PortalObject.PORTAL_MASK).size());
+ TransactionAssert.beginTransaction();
assertEquals(nbPages, root.getChild("p" + portalIndex).getChildren().size());
assertEquals(nbPages, root.getChild("p" + portalIndex).getChildren(PortalObject.PAGE_MASK).size());
+ TransactionAssert.commitTransaction();
- for (int i = 0; i < 1000000; i++)
+ for (int i = 0; i < 1000; i++)
{
- portalIndex = (int) (nbPortals * Math.random());
+ portalIndex = (int)(nbPortals * Math.random());
String portalName = "p" + portalIndex;
+ TransactionAssert.beginTransaction();
PortalObject child = root.getChild(portalName);
assertNotNull(child);
- int pageIndex = (int) (nbPages * Math.random());
+ int pageIndex = (int)(nbPages * Math.random());
child = child.getChild(portalName + "pa" + pageIndex);
assertNotNull(child);
assertEquals(2 + nbWindows, child.getChildren().size());
assertEquals(2, child.getChildren(PortalObject.PAGE_MASK).size());
assertEquals(nbWindows, child.getChildren(PortalObject.WINDOW_MASK).size());
+ TransactionAssert.commitTransaction();
}
System.out.println("Tests time = " + (System.currentTimeMillis() - time));
}*/
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-13 10:23:21 UTC (rev 13023)
@@ -8,23 +8,17 @@
}
/*
-Add height to handle div so that we can drag from the whole bar instead of just the title.
+Add height to handle div so that we can drag from the whole bar instead of just the title. Should work in IE as well,
+though it hasn't been tested.
*/
.dnd-handle {
cursor: move;
- min-height: 21px;
- position: absolute;
- top: 10px;
- width: 70%;
- z-index: 1;
+ position: relative;
+ min-height: 1.2em;
height: auto !important;
- height: 21px;
+ height: 1.2em;
}
-.dyna-decoration {
- position: relative;
-}
-
.dnd-droppable {
border: green 1px dashed;
background-color: Transparent;
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-13 10:23:21 UTC (rev 13023)
@@ -66,13 +66,15 @@
DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
//
+ markup.print("<div class=\"dnd-handle\">");
markup.print("<div class=\"dyna-decoration\">\n");
- markup.print("<div class=\"dnd-handle\"></div>");
delegate.render(rendererContext, drc);
// Close dnd-decoration
markup.print("</div>");
+ // Close dnd-handle
+ markup.print("</div>");
}
else
17 years, 1 month
JBoss Portal SVN: r13022 - tags/JBoss_Portal_2_6_8/core/src/main/org/jboss/portal/test/core/model/portal.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-03-12 15:51:43 -0400 (Thu, 12 Mar 2009)
New Revision: 13022
Modified:
tags/JBoss_Portal_2_6_8/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
Log:
Fix testcase
Modified: tags/JBoss_Portal_2_6_8/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
===================================================================
--- tags/JBoss_Portal_2_6_8/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-03-12 19:42:08 UTC (rev 13021)
+++ tags/JBoss_Portal_2_6_8/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-03-12 19:51:43 UTC (rev 13022)
@@ -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
@@ -237,4 +239,4 @@
}
System.out.println("Tests time = " + (System.currentTimeMillis() - time));
}*/
-}
\ No newline at end of file
+}
17 years, 1 month
JBoss Portal SVN: r13021 - branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal.
by portal-commits@lists.jboss.org
Author: prabhat.jha(a)jboss.com
Date: 2009-03-12 15:42:08 -0400 (Thu, 12 Mar 2009)
New Revision: 13021
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
Log:
add transaction to testGetChild
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-03-11 19:13:14 UTC (rev 13020)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-03-12 19:42:08 UTC (rev 13021)
@@ -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
17 years, 1 month