JBoss Portal SVN: r9888 - in modules/portlet/trunk/test/src: main/java/org/jboss/portal/portlet/controller/state and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-09 07:14:27 -0500 (Sat, 09 Feb 2008)
New Revision: 9888
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalStateSerialization.java
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/StateControllerContextImpl.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalState.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/WindowNavigationalState.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/AbstractPortletControllerContext.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletURLRenderer.java
modules/portlet/trunk/test/src/test/java/org/jboss/portal/portlet/controller/StateControllerContextTestCase.java
Log:
extract page navigational state serialization for better reusability
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java 2008-02-09 12:08:11 UTC (rev 9887)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -43,7 +43,7 @@
class PageNavigationalStateImpl implements PageNavigationalState, Serializable
{
- /** We don't save it. */
+ /** . */
protected final StateControllerContextImpl context;
/** . */
@@ -116,6 +116,11 @@
return publicNavigationalState;
}
+ public Set<QName> getPublicNames()
+ {
+ return page.keySet();
+ }
+
public String[] getPublicNavigationalState(QName name)
{
return page.get(name).clone();
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/StateControllerContextImpl.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/StateControllerContextImpl.java 2008-02-09 12:08:11 UTC (rev 9887)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/impl/state/StateControllerContextImpl.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -25,24 +25,7 @@
import org.jboss.portal.portlet.controller.PortletControllerContext;
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.portlet.controller.state.StateControllerContext;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.ParametersStateString;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-import org.jboss.portal.common.io.UndeclaredIOException;
-import javax.xml.namespace.QName;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.DataOutputStream;
-import java.io.DataInputStream;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-import java.util.Map;
-import java.util.HashMap;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -50,35 +33,8 @@
public class StateControllerContextImpl implements StateControllerContext
{
- /** . */
- private static final Map<WindowState, Integer> windowStateToCode = new HashMap<WindowState, Integer>();
/** . */
- private static final Map<Mode, Integer> modeToCode = new HashMap<Mode, Integer>();
-
- /** . */
- private static final Map<Integer, WindowState> codeToWindowState = new HashMap<Integer, WindowState>();
-
- /** . */
- private static final Map<Integer, Mode> codeToMode = new HashMap<Integer, Mode>();
-
- static
- {
- windowStateToCode.put(WindowState.NORMAL, 1);
- windowStateToCode.put(WindowState.MINIMIZED, 2);
- windowStateToCode.put(WindowState.MAXIMIZED, 3);
- codeToWindowState.put(1, WindowState.NORMAL);
- codeToWindowState.put(2, WindowState.MINIMIZED);
- codeToWindowState.put(3, WindowState.MAXIMIZED);
- modeToCode.put(Mode.VIEW, 1);
- modeToCode.put(Mode.EDIT, 2);
- modeToCode.put(Mode.HELP, 3);
- codeToMode.put(1, Mode.VIEW);
- codeToMode.put(2, Mode.EDIT);
- codeToMode.put(3, Mode.HELP);
- }
-
- /** . */
protected final PortletControllerContext portletControllerContext;
public StateControllerContextImpl(PortletControllerContext portletControllerContext)
@@ -101,167 +57,4 @@
{
return new PageNavigationalStateImpl(this, modifiable);
}
-
- public byte[] serialize(PageNavigationalState object)
- {
- try
- {
- PageNavigationalStateImpl pageState = (PageNavigationalStateImpl)object;
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- GZIPOutputStream zos = new GZIPOutputStream(baos);
- DataOutputStream out = new DataOutputStream(zos);
-
- //
- out.writeInt(pageState.windows.size());
- for (Map.Entry<String, WindowNavigationalState> entry : pageState.windows.entrySet())
- {
- out.writeUTF(entry.getKey());
- WindowNavigationalState windowNS = entry.getValue();
- byte header = 0;
- int decision = 0;
- if (windowNS.getPortletNavigationalState() != null)
- {
- header |= 1;
- decision |= 1;
- }
- if (windowNS.getWindowState() != null)
- {
- Integer value = windowStateToCode.get(windowNS.getWindowState());
- if (value != null)
- {
- header |= value << 1;
- }
- else
- {
- header |= 4 << 1;
- decision |= 2;
- }
- }
- if (windowNS.getMode() != null)
- {
- Integer value = modeToCode.get(windowNS.getMode());
- if (value != null)
- {
- header |= value << 4;
- }
- else
- {
- header |= 4 << 4;
- decision |= 4;
- }
- }
- out.writeByte(header);
- if ((decision & 1) != 0)
- {
- windowNS.getPortletNavigationalState().writeTo(out);
- }
- if ((decision & 2) != 0)
- {
- out.writeUTF(windowNS.getWindowState().toString());
- }
- if ((decision & 4) != 0)
- {
- out.writeUTF(windowNS.getMode().toString());
- }
- }
-
- //
- Map<QName, String[]> publicNS = pageState.page;
- out.writeInt(publicNS.size());
- for (Map.Entry<QName, String[]> entry : publicNS.entrySet())
- {
- QName name = entry.getKey();
- out.writeUTF(name.getNamespaceURI());
- out.writeUTF(name.getLocalPart());
- String[] values = entry.getValue();
- int length = values.length;
- out.writeInt(length);
- for (String value : values)
- {
- out.writeUTF(value);
- }
- }
-
- //
- out.close();
- return baos.toByteArray();
- }
- catch (IOException e)
- {
- throw new UndeclaredIOException(e);
- }
- }
-
- public PageNavigationalState unserialize(byte[] bytes, boolean modifiable)
- {
- try
- {
- ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
- GZIPInputStream zis = new GZIPInputStream(bais);
- DataInputStream in = new DataInputStream(zis);
- PageNavigationalStateImpl pageState = new PageNavigationalStateImpl(this, modifiable);
-
- //
- int size = in.readInt();
- while (size-- > 0)
- {
- String windowId = in.readUTF();
- byte header = in.readByte();
- StateString portletNS = null;
- if ((header & 1) != 0)
- {
- portletNS = ParametersStateString.create(in);
- }
- WindowState windowState = null;
- int windowStateHeader = (header & (7 << 1)) >> 1;
- switch (windowStateHeader)
- {
- case 0:
- break;
- case 4:
- windowState = WindowState.create(in.readUTF());
- break;
- default:
- windowState = codeToWindowState.get(windowStateHeader);
- }
- Mode mode = null;
- int modeStateHeader = (header & (7 << (1 + 3))) >> (1 + 3);
- switch (modeStateHeader)
- {
- case 0:
- break;
- case 4:
- mode = Mode.create(in.readUTF());
- break;
- default:
- mode = codeToMode.get(modeStateHeader);
- }
- WindowNavigationalState windowNS = new WindowNavigationalState(portletNS, mode, windowState);
- pageState.windows.put(windowId, windowNS);
- }
-
- //
- size = in.readInt();
- while (size-- > 0)
- {
- String namespaceURI = in.readUTF();
- String localName = in.readUTF();
- QName name = new QName(namespaceURI, localName);
- int length = in.readInt();
- String[] values = new String[length];
- for (int i = 0;i < length;i++)
- {
- values[i] = in.readUTF();
- }
- pageState.page.put(name, values);
- }
-
- //
- return pageState;
- }
- catch (IOException e)
- {
- throw new UndeclaredIOException(e);
- }
- }
}
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalState.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalState.java 2008-02-09 12:08:11 UTC (rev 9887)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalState.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -77,6 +77,13 @@
ParameterMap getPublicNavigationalState(String windowId) throws IllegalArgumentException;
/**
+ * Returns the set of public names.
+ *
+ * @return the public names
+ */
+ Set<QName> getPublicNames();
+
+ /**
* Update the public navigational state of a window. The interpretation of what should be updated is left up to the
* implementor. An example of implementation would use the mapping between qname and name provided by the referenced
* portlet info.
Added: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalStateSerialization.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalStateSerialization.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/PageNavigationalStateSerialization.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -0,0 +1,234 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.controller.state;
+
+import org.jboss.portal.common.io.Serialization;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.Mode;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.ParametersStateString;
+
+import javax.xml.namespace.QName;
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.DataOutputStream;
+import java.io.DataInputStream;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+
+/**
+ * Implement serialization of a page navigational state in a compact manner.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PageNavigationalStateSerialization implements Serialization<PageNavigationalState>
+{
+
+ /** . */
+ private static final Map<WindowState, Integer> windowStateToCode = new HashMap<WindowState, Integer>();
+
+ /** . */
+ private static final Map<Mode, Integer> modeToCode = new HashMap<Mode, Integer>();
+
+ /** . */
+ private static final Map<Integer, WindowState> codeToWindowState = new HashMap<Integer, WindowState>();
+
+ /** . */
+ private static final Map<Integer, Mode> codeToMode = new HashMap<Integer, Mode>();
+
+ static
+ {
+ windowStateToCode.put(WindowState.NORMAL, 1);
+ windowStateToCode.put(WindowState.MINIMIZED, 2);
+ windowStateToCode.put(WindowState.MAXIMIZED, 3);
+ codeToWindowState.put(1, WindowState.NORMAL);
+ codeToWindowState.put(2, WindowState.MINIMIZED);
+ codeToWindowState.put(3, WindowState.MAXIMIZED);
+ modeToCode.put(Mode.VIEW, 1);
+ modeToCode.put(Mode.EDIT, 2);
+ modeToCode.put(Mode.HELP, 3);
+ codeToMode.put(1, Mode.VIEW);
+ codeToMode.put(2, Mode.EDIT);
+ codeToMode.put(3, Mode.HELP);
+ }
+
+ /** . */
+ private final StateControllerContext context;
+
+ public PageNavigationalStateSerialization(StateControllerContext context)
+ {
+ if (context == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.context = context;
+ }
+
+ public void serialize(PageNavigationalState pageState, OutputStream out) throws IOException, IllegalArgumentException
+ {
+ DataOutputStream data = out instanceof DataOutputStream ? (DataOutputStream)out : new DataOutputStream(out);
+
+ //
+ data.writeInt(pageState.getWindowIds().size());
+ for (String windowId : pageState.getWindowIds())
+ {
+ data.writeUTF(windowId);
+ WindowNavigationalState windowNS = pageState.getWindowNavigationalState(windowId);
+ byte header = 0;
+ int decision = 0;
+ if (windowNS.getPortletNavigationalState() != null)
+ {
+ header |= 1;
+ decision |= 1;
+ }
+ if (windowNS.getWindowState() != null)
+ {
+ Integer value = windowStateToCode.get(windowNS.getWindowState());
+ if (value != null)
+ {
+ header |= value << 1;
+ }
+ else
+ {
+ header |= 4 << 1;
+ decision |= 2;
+ }
+ }
+ if (windowNS.getMode() != null)
+ {
+ Integer value = modeToCode.get(windowNS.getMode());
+ if (value != null)
+ {
+ header |= value << 4;
+ }
+ else
+ {
+ header |= 4 << 4;
+ decision |= 4;
+ }
+ }
+ data.writeByte(header);
+ if ((decision & 1) != 0)
+ {
+ windowNS.getPortletNavigationalState().writeTo(data);
+ }
+ if ((decision & 2) != 0)
+ {
+ data.writeUTF(windowNS.getWindowState().toString());
+ }
+ if ((decision & 4) != 0)
+ {
+ data.writeUTF(windowNS.getMode().toString());
+ }
+ }
+
+ //
+ Set<QName> publicNames = pageState.getPublicNames();
+ data.writeInt(publicNames.size());
+ for (QName name : pageState.getPublicNames())
+ {
+ data.writeUTF(name.getNamespaceURI());
+ data.writeUTF(name.getLocalPart());
+ String[] values = pageState.getPublicNavigationalState(name);
+ int length = values.length;
+ data.writeInt(length);
+ for (String value : values)
+ {
+ data.writeUTF(value);
+ }
+ }
+
+ // Need to flush before returning otherwise bytes may stay in the buffer when we allocated
+ // a data stream
+ data.flush();
+ }
+
+ public PageNavigationalState unserialize(InputStream in) throws IOException, IllegalArgumentException
+ {
+ DataInputStream data = in instanceof DataInputStream ? (DataInputStream)in : new DataInputStream(in);
+
+ //
+ PageNavigationalState pageNS = context.createPageState(true);
+
+ //
+ int size = data.readInt();
+ while (size-- > 0)
+ {
+ String windowId = data.readUTF();
+ byte header = data.readByte();
+ StateString portletNS = null;
+ if ((header & 1) != 0)
+ {
+ portletNS = ParametersStateString.create(data);
+ }
+ WindowState windowState = null;
+ int windowStateHeader = (header & (7 << 1)) >> 1;
+ switch (windowStateHeader)
+ {
+ case 0:
+ break;
+ case 4:
+ windowState = WindowState.create(data.readUTF());
+ break;
+ default:
+ windowState = codeToWindowState.get(windowStateHeader);
+ }
+ Mode mode = null;
+ int modeStateHeader = (header & (7 << (1 + 3))) >> (1 + 3);
+ switch (modeStateHeader)
+ {
+ case 0:
+ break;
+ case 4:
+ mode = Mode.create(data.readUTF());
+ break;
+ default:
+ mode = codeToMode.get(modeStateHeader);
+ }
+ WindowNavigationalState windowNS = new WindowNavigationalState(portletNS, mode, windowState);
+ pageNS.setWindowNavigationalState(windowId, windowNS);
+ }
+
+ //
+ size = data.readInt();
+ while (size-- > 0)
+ {
+ String namespaceURI = data.readUTF();
+ String localName = data.readUTF();
+ QName name = new QName(namespaceURI, localName);
+ int length = data.readInt();
+ String[] values = new String[length];
+ for (int i = 0;i < length;i++)
+ {
+ values[i] = data.readUTF();
+ }
+ pageNS.setPublicNavigationalState(name, values);
+ }
+
+ //
+ return pageNS;
+ }
+}
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/WindowNavigationalState.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/WindowNavigationalState.java 2008-02-09 12:08:11 UTC (rev 9887)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/state/WindowNavigationalState.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -30,6 +30,7 @@
/**
* The navigational state of a window that contains the portlet navigational state, the mode and window state.
+ * This class is immutable.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/AbstractPortletControllerContext.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/AbstractPortletControllerContext.java 2008-02-09 12:08:11 UTC (rev 9887)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/AbstractPortletControllerContext.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -27,6 +27,7 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.common.io.Serialization;
+import org.jboss.portal.common.io.SerializationFilter;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.MediaType;
import org.jboss.portal.common.util.ParameterMap;
@@ -48,6 +49,7 @@
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.portlet.controller.state.StateControllerContext;
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PageNavigationalStateSerialization;
import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
@@ -116,6 +118,9 @@
{
StateControllerContextImpl tmp = new StateControllerContextImpl(this);
+ //
+ PageNavigationalStateSerialization serialization = new PageNavigationalStateSerialization(tmp);
+
// The nav state provided with the request
// Unmarshall portal navigational state if it is provided
PageNavigationalState pageState = null;
@@ -123,7 +128,7 @@
if (context != null)
{
byte[] bytes = Base64.decode(context, true);
- pageState = tmp.unserialize(bytes, false);
+ pageState = IOTools.unserialize(serialization, SerializationFilter.COMPRESSOR, bytes);
}
// The type of invocation
@@ -239,7 +244,7 @@
else
{
byte[] bytes = Base64.decode(req.getParameter(PUBLIC_NAVIGATIONAL_STATE_CHANGES), true);
- Map<String, String[]> publicNavigationalStateChanges = IOTools.unserialize(Serialization.PARAMETER_MAP, bytes);
+ Map<String, String[]> publicNavigationalStateChanges = IOTools.unserialize(Serialization.PARAMETER_MAP, SerializationFilter.COMPRESSOR, bytes);
//
request = new PortletRenderRequest(
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletURLRenderer.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletURLRenderer.java 2008-02-09 12:08:11 UTC (rev 9887)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletURLRenderer.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.common.io.Serialization;
+import org.jboss.portal.common.io.SerializationFilter;
import org.jboss.portal.common.text.CharBuffer;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.common.util.Base64;
@@ -37,6 +38,7 @@
import org.jboss.portal.portlet.cache.CacheLevel;
import org.jboss.portal.portlet.controller.impl.state.StateControllerContextImpl;
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PageNavigationalStateSerialization;
import static org.jboss.portal.portlet.test.URLParameterConstants.*;
import javax.servlet.http.HttpServletRequest;
@@ -56,6 +58,9 @@
final StateControllerContextImpl stateContext;
/** . */
+ final PageNavigationalStateSerialization serialization;
+
+ /** . */
final HttpServletRequest clientReq;
/** . */
@@ -74,6 +79,7 @@
this.pageNS = pageNS;
this.clientReq = clientReq;
this.clientResp = clientResp;
+ this.serialization = new PageNavigationalStateSerialization(stateContext);
}
private String renderURL(Map<String, String> parameters, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
@@ -116,7 +122,7 @@
String pageState = null;
if (pageNS != null)
{
- byte[] bytes = stateContext.serialize(pageNS);
+ byte[] bytes = IOTools.serialize(serialization, SerializationFilter.COMPRESSOR, pageNS);
pageState = Base64.encodeBytes(bytes, true);
}
@@ -169,7 +175,7 @@
String pageState = null;
if (pageNS != null)
{
- byte[] bytes = stateContext.serialize(pageNS);
+ byte[] bytes = IOTools.serialize(serialization, SerializationFilter.COMPRESSOR, pageNS);
pageState = Base64.encodeBytes(bytes, true);
}
@@ -216,7 +222,7 @@
//
Map<String, String[]> changes = renderURL.getPublicNavigationalStateChanges();
- byte[] bytes = IOTools.serialize(Serialization.PARAMETER_MAP, changes);
+ byte[] bytes = IOTools.serialize(Serialization.PARAMETER_MAP, SerializationFilter.COMPRESSOR, changes);
String ns = Base64.encodeBytes(bytes, true);
parameters.put(PUBLIC_NAVIGATIONAL_STATE_CHANGES, ns);
Modified: modules/portlet/trunk/test/src/test/java/org/jboss/portal/portlet/controller/StateControllerContextTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/test/java/org/jboss/portal/portlet/controller/StateControllerContextTestCase.java 2008-02-09 12:08:11 UTC (rev 9887)
+++ modules/portlet/trunk/test/src/test/java/org/jboss/portal/portlet/controller/StateControllerContextTestCase.java 2008-02-09 12:14:27 UTC (rev 9888)
@@ -27,6 +27,7 @@
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.portlet.controller.state.StateControllerContext;
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PageNavigationalStateSerialization;
import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.PortletInvokerException;
@@ -38,6 +39,8 @@
import org.jboss.portal.portlet.invocation.ResourceInvocation;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.common.io.SerializationFilter;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import static org.jboss.unit.api.Assert.*;
@@ -96,8 +99,8 @@
private void assertMarshallable(PageNavigationalState pageNS)
{
- byte[] bytes = cc.serialize(pageNS);
- PageNavigationalState expectedPageNS = cc.unserialize(bytes, true);
+ byte[] bytes = IOTools.serialize(new PageNavigationalStateSerialization(cc), /*SerializationFilter.COMPRESSOR, */pageNS);
+ PageNavigationalState expectedPageNS = IOTools.unserialize(new PageNavigationalStateSerialization(cc), /*SerializationFilter.COMPRESSOR, */bytes);
assertEquals(expectedPageNS.getWindowIds(), pageNS.getWindowIds());
for (String windowId : expectedPageNS.getWindowIds())
{
16 years, 5 months
JBoss Portal SVN: r9887 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/io.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-09 07:08:11 -0500 (Sat, 09 Feb 2008)
New Revision: 9887
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java
Log:
use gzip output stream finish instead of flush
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java 2008-02-09 12:00:40 UTC (rev 9886)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java 2008-02-09 12:08:11 UTC (rev 9887)
@@ -59,6 +59,7 @@
{
GZIPOutputStream zos = new GZIPOutputStream(out);
serialization.serialize(t, zos);
+ zos.finish();
}
public <T> T unserialize(Serialization<T> serialization, InputStream in) throws IllegalArgumentException, IOException
16 years, 5 months
JBoss Portal SVN: r9886 - in modules/test/trunk: build and 14 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-02-09 07:00:40 -0500 (Sat, 09 Feb 2008)
New Revision: 9886
Modified:
modules/test/trunk/build/pom.xml
modules/test/trunk/mc/pom.xml
modules/test/trunk/pom.xml
modules/test/trunk/remote/pom.xml
modules/test/trunk/test/agent/pom.xml
modules/test/trunk/test/core/pom.xml
modules/test/trunk/test/generic/pom.xml
modules/test/trunk/test/jboss/pom.xml
modules/test/trunk/test/opends/pom.xml
modules/test/trunk/tooling/ant/pom.xml
modules/test/trunk/tooling/core/pom.xml
modules/test/trunk/tooling/examples/maven2/pom.xml
modules/test/trunk/tooling/maven2/pom.xml
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/UnitMojo.java
modules/test/trunk/tooling/pom.xml
modules/test/trunk/unit/pom.xml
Log:
- rename to artifacts
- version update to 1.2.0-Beta1
Modified: modules/test/trunk/build/pom.xml
===================================================================
--- modules/test/trunk/build/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/build/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -17,8 +17,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<packaging>pom</packaging>
<name>JBoss Portal Test Module</name>
<url>http://www.jboss.com/products/jbossmc</url>
Modified: modules/test/trunk/mc/pom.xml
===================================================================
--- modules/test/trunk/mc/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/mc/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/pom.xml
===================================================================
--- modules/test/trunk/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,10 +2,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test-aggregator</artifactId>
+ <artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Test</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0-Beta1</version>
<url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/remote/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/test/agent/pom.xml
===================================================================
--- modules/test/trunk/test/agent/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/test/agent/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/test/core/pom.xml
===================================================================
--- modules/test/trunk/test/core/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/test/core/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/test/generic/pom.xml
===================================================================
--- modules/test/trunk/test/generic/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/test/generic/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/test/jboss/pom.xml
===================================================================
--- modules/test/trunk/test/jboss/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/test/jboss/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/test/opends/pom.xml
===================================================================
--- modules/test/trunk/test/opends/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/test/opends/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/tooling/ant/pom.xml
===================================================================
--- modules/test/trunk/tooling/ant/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/tooling/ant/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/tooling/core/pom.xml
===================================================================
--- modules/test/trunk/tooling/core/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/tooling/core/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/tooling/examples/maven2/pom.xml
===================================================================
--- modules/test/trunk/tooling/examples/maven2/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/tooling/examples/maven2/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -11,7 +11,7 @@
<dependency>
<groupId>org.jboss.unit</groupId>
<artifactId>jboss-unit</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0-Beta1</version>
</dependency>
</dependencies>
@@ -39,7 +39,7 @@
<plugin>
<groupId>org.jboss.unit</groupId>
<artifactId>jboss-unit-tooling-maven2</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0-Beta1</version>
<executions>
<execution>
<phase>test</phase>
Modified: modules/test/trunk/tooling/maven2/pom.xml
===================================================================
--- modules/test/trunk/tooling/maven2/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/tooling/maven2/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/UnitMojo.java
===================================================================
--- modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/UnitMojo.java 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/UnitMojo.java 2008-02-09 12:00:40 UTC (rev 9886)
@@ -61,9 +61,9 @@
/**
* @parameter
*/
- private String jpdaSuspend;
+ private String jpdaSuspend = "true";
- /** s
+ /**
* @parameter
*/
private boolean useJUL = true;
Modified: modules/test/trunk/tooling/pom.xml
===================================================================
--- modules/test/trunk/tooling/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/tooling/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -11,7 +11,7 @@
<artifactId>jboss-unit-tooling-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Unit Tooling (aggregator)</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0-Beta1</version>
<modules>
<module>core</module>
<module>ant</module>
Modified: modules/test/trunk/unit/pom.xml
===================================================================
--- modules/test/trunk/unit/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
+++ modules/test/trunk/unit/pom.xml 2008-02-09 12:00:40 UTC (rev 9886)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-portal-modules-test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-Beta1</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
16 years, 5 months
JBoss Portal SVN: r9885 - in modules/portlet/trunk: portlet-controller and 11 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-02-09 06:37:47 -0500 (Sat, 09 Feb 2008)
New Revision: 9885
Added:
modules/portlet/trunk/portlet-controller/
modules/portlet/trunk/portlet-controller/pom.xml
modules/portlet/trunk/portlet-controller/src/
modules/portlet/trunk/portlet-controller/src/main/
modules/portlet/trunk/portlet-controller/src/main/java/
modules/portlet/trunk/portlet-controller/src/main/java/org/
modules/portlet/trunk/portlet-controller/src/main/java/org/jboss/
modules/portlet/trunk/portlet-controller/src/main/java/org/jboss/portal/
modules/portlet/trunk/portlet-controller/src/main/java/org/jboss/portal/portlet/
modules/portlet/trunk/portlet-controller/src/test/
modules/portlet/trunk/portlet-controller/src/test/java/
modules/portlet/trunk/portlet-controller/src/test/java/org/
modules/portlet/trunk/portlet-controller/src/test/java/org/jboss/
modules/portlet/trunk/portlet-controller/src/test/java/org/jboss/portal/
modules/portlet/trunk/portlet-controller/src/test/java/org/jboss/portal/portlet/
modules/portlet/trunk/portlet-controller/src/test/resources/
Log:
initial import of empty structure
Added: modules/portlet/trunk/portlet-controller/pom.xml
===================================================================
--- modules/portlet/trunk/portlet-controller/pom.xml (rev 0)
+++ modules/portlet/trunk/portlet-controller/pom.xml 2008-02-09 11:37:47 UTC (rev 9885)
@@ -0,0 +1,195 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>portlet-controller</artifactId>
+ <packaging>jar</packaging>
+ <name>Portlet controller</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+
+ <!--TEST SCOPE-->
+ <!--dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>common-mc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>javassist</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-remote</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-mc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-tooling-ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test-generic</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>resolver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-jdk</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-core-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-structure-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-managed</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-metatype</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.aop</groupId>
+ <artifactId>jboss-aop</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>cargo-manager</artifactId>
+ <type>war</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>web-web</artifactId>
+ <type>jar</type>
+ </dependency-->
+ <!--
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-jsr168api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ -->
+ <!--dependency>
+ <groupId>javax.portlet</groupId>
+ <artifactId>portlet-api</artifactId>
+ </dependency-->
+
+ </dependencies>
+
+</project>
16 years, 5 months
JBoss Portal SVN: r9884 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/io.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-09 06:05:31 -0500 (Sat, 09 Feb 2008)
New Revision: 9884
Added:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/IOTools.java
Log:
make serialization stuff more reusable
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/IOTools.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/IOTools.java 2008-02-09 04:57:27 UTC (rev 9883)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/IOTools.java 2008-02-09 11:05:31 UTC (rev 9884)
@@ -388,6 +388,11 @@
public static <T> byte[] serialize(Serialization<T> serialization, T t)
{
+ return serialize(serialization, SerializationFilter.TRIVIAL, t);
+ }
+
+ public static <T> byte[] serialize(Serialization<T> serialization, SerializationFilter filter, T t)
+ {
if (serialization == null)
{
throw new IllegalArgumentException();
@@ -399,7 +404,7 @@
try
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- serialization.serialize(t, baos);
+ filter.serialize(serialization, t, baos);
return baos.toByteArray();
}
catch (IOException e)
@@ -410,6 +415,11 @@
public static <T> T unserialize(Serialization<T> serialization, byte[] bytes)
{
+ return unserialize(serialization, SerializationFilter.TRIVIAL, bytes);
+ }
+
+ public static <T> T unserialize(Serialization<T> serialization, SerializationFilter filter, byte[] bytes)
+ {
if (serialization == null)
{
throw new IllegalArgumentException();
@@ -421,7 +431,7 @@
try
{
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
- return serialization.unserialize(bais);
+ return filter.unserialize(serialization, bais);
}
catch (IOException e)
{
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/io/SerializationFilter.java 2008-02-09 11:05:31 UTC (rev 9884)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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. *
+ ******************************************************************************/
+package org.jboss.portal.common.io;
+
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.GZIPOutputStream;
+import java.util.zip.GZIPInputStream;
+
+/**
+ * Filters a stream for serialize/unserialize operations.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface SerializationFilter
+{
+
+ SerializationFilter TRIVIAL = new SerializationFilter()
+ {
+ public <T> void serialize(Serialization<T> serialization, T t, OutputStream out) throws IllegalArgumentException, IOException
+ {
+ serialization.serialize(t, out);
+ }
+
+ public <T> T unserialize(Serialization<T> serialization, InputStream in) throws IllegalArgumentException, IOException
+ {
+ return serialization.unserialize(in);
+ }
+ };
+
+ /**
+ * Use GZIP streams.
+ */
+ SerializationFilter COMPRESSOR = new SerializationFilter()
+ {
+ public <T> void serialize(Serialization<T> serialization, T t, OutputStream out) throws IllegalArgumentException, IOException
+ {
+ GZIPOutputStream zos = new GZIPOutputStream(out);
+ serialization.serialize(t, zos);
+ }
+
+ public <T> T unserialize(Serialization<T> serialization, InputStream in) throws IllegalArgumentException, IOException
+ {
+ GZIPInputStream zis = new GZIPInputStream(in);
+ return serialization.unserialize(zis);
+ }
+ };
+
+ <T> void serialize(Serialization<T> serialization, T t, OutputStream out) throws IllegalArgumentException, IOException;
+
+ <T> T unserialize(Serialization<T> serialization, InputStream in) throws IllegalArgumentException, IOException;
+
+}
16 years, 5 months
JBoss Portal SVN: r9883 - in modules/portlet/trunk: test/src/main/java/org/jboss/portal/portlet/test/jsp and 9 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-02-08 23:57:27 -0500 (Fri, 08 Feb 2008)
New Revision: 9883
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartEvent.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartPortlet.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/Catalog.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogItem.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogPortlet.java
modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/
modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/
modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/portlet.xml
modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/web.xml
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/StateAwareResponseImpl.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java
modules/portlet/trunk/test/src/test/build.xml
modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp
Log:
- Added event demo portlets: a catalog and a cart. Does not currently work as there seems to be problem with the event processing.
- Modified PagePortletControllerContext.getPortlet as the given parameter is not always a windowId (in particular, it's a portlet id when processing events).
The current fix is probably a hack and indicative of a more serious issue (as evidenced with further problems down the stream).
- Fixed incorrect forward in index.jsp.
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/StateAwareResponseImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/StateAwareResponseImpl.java 2008-02-09 03:22:01 UTC (rev 9882)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/StateAwareResponseImpl.java 2008-02-09 04:57:27 UTC (rev 9883)
@@ -283,11 +283,11 @@
// Check jaxb annotation
if (requiresJAXBAnnotation(valueType))
{
- for (Annotation a : value.getClass().getAnnotations())
+ for (Annotation a : valueType.getAnnotations())
{
System.out.println("a = " + a);
}
- boolean b = value.getClass().isAnnotationPresent(XmlRootElement.class);
+ boolean b = valueType.isAnnotationPresent(XmlRootElement.class);
if (!b)
{
throw new IllegalArgumentException("The provided event value type " + value.getClass().getName() +
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java 2008-02-09 03:22:01 UTC (rev 9882)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java 2008-02-09 04:57:27 UTC (rev 9883)
@@ -22,25 +22,25 @@
******************************************************************************/
package org.jboss.portal.portlet.test.jsp;
-import org.jboss.portal.portlet.test.controller.AbstractPortletControllerContext;
import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletInvoker;
-import org.jboss.portal.portlet.PortletContext;
-import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.impl.event.EventControllerContextImpl;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.test.controller.AbstractPortletControllerContext;
import org.jboss.portal.web.IllegalRequestException;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
import java.io.IOException;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -93,6 +93,14 @@
{
int index = windowId.lastIndexOf('.');
String portletId = windowId.substring(0, index);
+
+ // in the case of an event propagation, the given 'windowId' is actually the portlet id already so need to check
+ // for that case (portletId should still have a '.', if not it means that the windowId was really a portlet id)
+ if (portletId.indexOf('.') == -1)
+ {
+ portletId = windowId;
+ }
+
PortletContext portletContext = PortletContext.createPortletContext(portletId);
return invoker.getPortlet(portletContext);
}
Added: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartEvent.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartEvent.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartEvent.java 2008-02-09 04:57:27 UTC (rev 9883)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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. *
+ ******************************************************************************/
+
+package org.jboss.portal.simple.samples.event;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@XmlRootElement
+public class CartEvent implements Serializable
+{
+ private String id;
+
+ public static final QName QNAME = new QName("urn:jboss:portal:samples:event", "CartEvent");
+
+ public CartEvent(String id)
+ {
+ this.id = id;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+}
Property changes on: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartEvent.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartPortlet.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartPortlet.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartPortlet.java 2008-02-09 04:57:27 UTC (rev 9883)
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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. *
+ ******************************************************************************/
+
+package org.jboss.portal.simple.samples.event;
+
+import javax.portlet.Event;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class CartPortlet extends GenericPortlet
+{
+ List<CatalogItem> items = new ArrayList<CatalogItem>(7);
+
+ @Override
+ protected void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException
+ {
+ renderResponse.setContentType("text/html");
+ Writer writer = renderResponse.getWriter();
+
+
+ if (!items.isEmpty())
+ {
+ writer.append("<table><thead><tr><th>Description</th><th>Price</th></tr></thead><tbody>");
+ int total = 0;
+ for (CatalogItem item : items)
+ {
+ int price = item.getPrice();
+ total += price;
+ writer.append("<tr><td>").append(item.getDescription()).append("</td><td align='right'>$").append("" + price)
+ .append("</td></tr>");
+ }
+ writer.append("<tr><td colspan='2' align='right'>").append("$" + total).append("</td></tr></tbody></table>");
+ }
+ else
+ {
+ writer.append("Cart is empty.");
+ }
+ }
+
+ @Override
+ public void processEvent(EventRequest eventRequest, EventResponse eventResponse) throws PortletException, IOException
+ {
+ Event event = eventRequest.getEvent();
+ if (event.getName().equals("CartEvent"))
+ {
+ CartEvent cartEvent = (CartEvent)event.getValue();
+ items.add(Catalog.get(cartEvent.getId()));
+ }
+ }
+}
Property changes on: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CartPortlet.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/Catalog.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/Catalog.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/Catalog.java 2008-02-09 04:57:27 UTC (rev 9883)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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. *
+ ******************************************************************************/
+
+package org.jboss.portal.simple.samples.event;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class Catalog
+{
+ private static Map<String, CatalogItem> items;
+
+ static
+ {
+ items = new HashMap<String, CatalogItem>(7);
+ items.put("1", new CatalogItem("1", 800, "Bike"));
+ items.put("2", new CatalogItem("2", 450, "Snowboard"));
+ items.put("3", new CatalogItem("3", 225, "Tent"));
+ items.put("4", new CatalogItem("4", 75, "Backpack"));
+ items.put("5", new CatalogItem("5", 119, "Skateboard"));
+ items.put("6", new CatalogItem("6", 333, "Surfboard"));
+ items.put("7", new CatalogItem("7", 90, "Sneakers"));
+ }
+
+ private Catalog()
+ {
+ }
+
+ public static CatalogItem get(String id)
+ {
+ return items.get(id);
+ }
+
+ public static Collection<CatalogItem> getAll()
+ {
+ return items.values();
+ }
+}
Property changes on: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/Catalog.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogItem.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogItem.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogItem.java 2008-02-09 04:57:27 UTC (rev 9883)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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. *
+ ******************************************************************************/
+
+package org.jboss.portal.simple.samples.event;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class CatalogItem
+{
+ private String id;
+ private int price;
+ private String description;
+
+ public CatalogItem(String id, int price, String description)
+ {
+ this.id = id;
+ this.price = price;
+ this.description = description;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public int getPrice()
+ {
+ return price;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+}
Property changes on: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogItem.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogPortlet.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogPortlet.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogPortlet.java 2008-02-09 04:57:27 UTC (rev 9883)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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. *
+ ******************************************************************************/
+
+package org.jboss.portal.simple.samples.event;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class CatalogPortlet extends GenericPortlet
+{
+ @Override
+ protected void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException
+ {
+ renderResponse.setContentType("text/html");
+ Writer writer = renderResponse.getWriter();
+
+ writer.append("<table><thead><tr><th>Description</th><th>Price</th><th>Actions</th></tr></thead><tbody>");
+
+ PortletURL addURL = renderResponse.createActionURL();
+ addURL.setParameter("op", "add");
+
+ Collection<CatalogItem> items = Catalog.getAll();
+ for (CatalogItem item : items)
+ {
+ addURL.setParameter("id", item.getId());
+ writer.append("<tr><td>").append(item.getDescription()).append("</td><td>$").append("" + item.getPrice())
+ .append("</td><td><a href='").append(addURL.toString()).append("'>Add to cart</a></td></tr>");
+ }
+
+ writer.append("</tbody></table>");
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException
+ {
+ String value = actionRequest.getParameter("id");
+ actionResponse.setEvent(CartEvent.QNAME, new CartEvent(value));
+ }
+}
Property changes on: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/event/CatalogPortlet.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-02-09 03:22:01 UTC (rev 9882)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-02-09 04:57:27 UTC (rev 9883)
@@ -698,7 +698,6 @@
<fileset dir="${target}" includes="portlet-test-lib.jar"/>
<path refid="mc.portal-common"/>
- <path refid="mc.portal-portlet"/>
<!-- MC 2.0.0.Beta4 -->
<path refid="mc.trove"/>
@@ -711,13 +710,13 @@
<path refid="mc.jboss_xb"/>
<path refid="mc.jboss_aop"/>
<path refid="mc.jboss_microcontainer"/>
- <path refid="mc.jaxb-api"/>
<!-- For Tomcat -->
<path>
<pathelement path="${dependency.log4j.jar}"/>
<pathelement path="${dependency.activation.jar}"/>
<pathelement path="${dependency.xercesImpl.jar}"/>
+ <!--<path refid="mc.jaxb-api"/>-->
</path>
</copy>
@@ -762,12 +761,21 @@
<copy todir="${test.temp.dir}/remotecontrol-portlet-war">
<fileset dir="src/test/resources/remotecontrol-portlet-war"/>
- <fileset dir="${target}/classes" includes="org/jboss/portal/simple/samples/RemoteControlResourcePortlet.class"/>
+ <fileset dir="${target}/classes"
+ includes="org/jboss/portal/simple/samples/RemoteControlResourcePortlet.class"/>
</copy>
<jar jarfile="${target}/remotecontrol-portlet.war">
<fileset dir="${test.temp.dir}/remotecontrol-portlet-war"/>
</jar>
+ <copy todir="${test.temp.dir}/cart-event-portlet-war">
+ <fileset dir="src/test/resources/cart-event-portlet-war"/>
+ <fileset dir="${target}/classes" includes="org/jboss/portal/simple/samples/event/*.class"/>
+ </copy>
+ <jar jarfile="${target}/cart-event-portlet.war">
+ <fileset dir="${test.temp.dir}/cart-event-portlet-war"/>
+ </jar>
+
<mkdir dir="${test.temp.dir}/portal"/>
<mkdir dir="${test.temp.dir}/portal/samples"/>
<copy todir="${test.temp.dir}/portal/samples-basic-war">
Copied: modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/portlet.xml (from rev 9878, modules/portlet/trunk/test/src/test/resources/google-map-portlet-war/WEB-INF/portlet.xml)
===================================================================
--- modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/portlet.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/portlet.xml 2008-02-09 04:57:27 UTC (rev 9883)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2008, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+ <portlet>
+ <description>Catalog Portlet</description>
+ <portlet-name>Catalog</portlet-name>
+ <display-name>Catalog Portlet</display-name>
+ <portlet-class>org.jboss.portal.simple.samples.event.CatalogPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Catalog Portlet</title>
+ <keywords>sample,event,catalog</keywords>
+ </portlet-info>
+ <supported-publishing-event>
+ <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
+ </supported-publishing-event>
+ </portlet>
+
+ <portlet>
+ <description>Cart Portlet</description>
+ <portlet-name>Cart</portlet-name>
+ <display-name>Cart Portlet</display-name>
+ <portlet-class>org.jboss.portal.simple.samples.event.CartPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Cart Portlet</title>
+ <keywords>sample,event,cart</keywords>
+ </portlet-info>
+ <supported-processing-event>
+ <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
+ </supported-processing-event>
+ </portlet>
+
+ <event-definition>
+ <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
+ <value-type>org.jboss.portal.simple.samples.event.CartEvent</value-type>
+ </event-definition>
+</portlet-app>
+
Copied: modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/web.xml (from rev 9878, modules/portlet/trunk/test/src/test/resources/google-map-portlet-war/WEB-INF/web.xml)
===================================================================
--- modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/web.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/cart-event-portlet-war/WEB-INF/web.xml 2008-02-09 04:57:27 UTC (rev 9883)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2008, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app/>
+
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp 2008-02-09 03:22:01 UTC (rev 9882)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp 2008-02-09 04:57:27 UTC (rev 9883)
@@ -4,21 +4,23 @@
<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
<%@ page isELIgnored="false" %>
- <%@ include file="/layouts/header.jsp" %>
-
- <portal:page>
- <portal:pageparam namespaceURI="urn:jboss:portal:simple:google" localName="zipcode" value="80201"/>
- <jbp:layout1>
+<%@ include file="/layouts/header.jsp" %>
+
+<portal:page>
+ <portal:pageparam namespaceURI="urn:jboss:portal:simple:google" localName="zipcode" value="80201"/>
+ <jbp:layout1>
<jsp:attribute name="leftcol">
<jbp:portlet name="RemoteControl" applicationName="remotecontrol-portlet"/>
<jbp:portlet name="Foo" applicationName="bar"/>
<jbp:portlet name="ErrorPortlet" applicationName="samples-basic"/>
+ <jbp:portlet name="Cart" applicationName="cart-event-portlet"/>
</jsp:attribute>
<jsp:attribute name="rightcol">
<jbp:portlet name="GoogleMap" applicationName="google-map-portlet"/>
<jbp:portlet name="GoogleWeather" applicationName="google-weather-portlet"/>
+ <jbp:portlet name="Catalog" applicationName="cart-event-portlet"/>
</jsp:attribute>
- </jbp:layout1>
- </portal:page>
+ </jbp:layout1>
+</portal:page>
- <%@ include file="/layouts/footer.jsp" %>
\ No newline at end of file
+<%@ include file="/layouts/footer.jsp" %>
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp 2008-02-09 03:22:01 UTC (rev 9882)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp 2008-02-09 04:57:27 UTC (rev 9883)
@@ -3,8 +3,8 @@
<%@ page isELIgnored="false" %>
<html>
<body>
-<jsp:forward page="demo/main.jsp" >
- <jsp:param name="nav" value="home" />
+<jsp:forward page="demo/home.jsp">
+ <jsp:param name="nav" value="home"/>
</jsp:forward>
</body>
</html>
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp 2008-02-09 03:22:01 UTC (rev 9882)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp 2008-02-09 04:57:27 UTC (rev 9883)
@@ -5,97 +5,98 @@
<%@ page isELIgnored="false" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+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" xml:lang="en" lang="en">
<head>
-<title>Portlet Container 2.0</title>
-<link rel="stylesheet" href="${pageContext.request.contextPath}/css/master.css" type="text/css"/>
+ <title>Portlet Container 2.0</title>
+ <link rel="stylesheet" href="${pageContext.request.contextPath}/css/master.css" type="text/css"/>
</head>
<body>
<div id="container" class="full-width">
<div class="header full-width">
<div class="float-left three-quarter-width logo"></div>
- <div class="float-right quarter-width pc20"><img src="/simple/images/pc20.gif" alt="Portlet Container 2.0"/></div>
+ <div class="float-right quarter-width pc20"><img src="${pageContext.request.contextPath}/images/pc20.gif"
+ alt="Portlet Container 2.0"/></div>
<br class="clear"/>
</div>
<%@ include file="nav/main.jsp" %>
<div id="content">
<portal:page>
- <div class="home-content full-width">
- <div class="third-width float-right">
- <jbp:portlet name="GoogleMap" applicationName="google-map-portlet" />
+ <div class="home-content full-width">
+ <div class="third-width float-right">
+ <jbp:portlet name="GoogleMap" applicationName="google-map-portlet"/>
</div>
- <h2 class="title">Demo Page Title</h2>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
- ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- <br/>
- </div>
+ <h2 class="title">Demo Page Title</h2>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ </div>
</portal:page>
</div>
16 years, 5 months
JBoss Portal SVN: r9882 - in modules/portlet/trunk/test/src/test/resources/simple-portal-war: layouts and 1 other directory.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-02-08 22:22:01 -0500 (Fri, 08 Feb 2008)
New Revision: 9882
Modified:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp
Log:
cleanup
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp 2008-02-09 03:13:21 UTC (rev 9881)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp 2008-02-09 03:22:01 UTC (rev 9882)
@@ -6,7 +6,6 @@
<%@ include file="/layouts/header.jsp" %>
- <div id="content">
<portal:page>
<portal:pageparam namespaceURI="urn:jboss:portal:simple:google" localName="zipcode" value="80201"/>
<jbp:layout1>
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp 2008-02-09 03:13:21 UTC (rev 9881)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp 2008-02-09 03:22:01 UTC (rev 9882)
@@ -6,7 +6,6 @@
<%@ include file="/layouts/header.jsp" %>
- <div id="content">
<portal:page>
<div class="home-content full-width">
<div class="third-width float-right">
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp 2008-02-09 03:13:21 UTC (rev 9881)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp 2008-02-09 03:22:01 UTC (rev 9882)
@@ -15,4 +15,5 @@
<div class="float-right quarter-width pc20"><img src="/simple/images/pc20.gif" alt="Portlet Container 2.0"/></div>
<br class="clear"/>
</div>
- <%@ include file="nav/main.jsp" %>
\ No newline at end of file
+ <%@ include file="nav/main.jsp" %>
+ <div id="content">
\ No newline at end of file
16 years, 5 months
JBoss Portal SVN: r9881 - in modules/portlet/trunk/test/src/test/resources/simple-portal-war: demo and 2 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-02-08 22:13:21 -0500 (Fri, 08 Feb 2008)
New Revision: 9881
Added:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/
modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/footer.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp
Modified:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp
Log:
nav changes and cleanup
Copied: modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp (from rev 9880, modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/demo.jsp)
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/demo.jsp 2008-02-09 03:13:21 UTC (rev 9881)
@@ -0,0 +1,25 @@
+<%@ page contentType="text/html" %>
+<%@ page language="java" %>
+<%@ taglib prefix="jbp" tagdir="/WEB-INF/tags/portal" %>
+<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
+<%@ page isELIgnored="false" %>
+
+ <%@ include file="/layouts/header.jsp" %>
+
+ <div id="content">
+ <portal:page>
+ <portal:pageparam namespaceURI="urn:jboss:portal:simple:google" localName="zipcode" value="80201"/>
+ <jbp:layout1>
+ <jsp:attribute name="leftcol">
+ <jbp:portlet name="RemoteControl" applicationName="remotecontrol-portlet"/>
+ <jbp:portlet name="Foo" applicationName="bar"/>
+ <jbp:portlet name="ErrorPortlet" applicationName="samples-basic"/>
+ </jsp:attribute>
+ <jsp:attribute name="rightcol">
+ <jbp:portlet name="GoogleMap" applicationName="google-map-portlet"/>
+ <jbp:portlet name="GoogleWeather" applicationName="google-weather-portlet"/>
+ </jsp:attribute>
+ </jbp:layout1>
+ </portal:page>
+
+ <%@ include file="/layouts/footer.jsp" %>
\ No newline at end of file
Copied: modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp (from rev 9880, modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp)
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/demo/home.jsp 2008-02-09 03:13:21 UTC (rev 9881)
@@ -0,0 +1,86 @@
+<%@ page contentType="text/html" %>
+<%@ page language="java" %>
+<%@ taglib prefix="jbp" tagdir="/WEB-INF/tags/portal" %>
+<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
+<%@ page isELIgnored="false" %>
+
+ <%@ include file="/layouts/header.jsp" %>
+
+ <div id="content">
+ <portal:page>
+ <div class="home-content full-width">
+ <div class="third-width float-right">
+ <jbp:portlet name="GoogleMap" applicationName="google-map-portlet" />
+ </div>
+ <h2 class="title">Demo Page Title</h2>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ </div>
+
+ </portal:page>
+
+ <%@ include file="/layouts/footer.jsp" %>
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp 2008-02-09 02:34:45 UTC (rev 9880)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/index.jsp 2008-02-09 03:13:21 UTC (rev 9881)
@@ -3,6 +3,8 @@
<%@ page isELIgnored="false" %>
<html>
<body>
-<jsp:forward page="layouts/default.jsp" />
+<jsp:forward page="demo/main.jsp" >
+ <jsp:param name="nav" value="home" />
+</jsp:forward>
</body>
</html>
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/footer.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/footer.jsp (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/footer.jsp 2008-02-09 03:13:21 UTC (rev 9881)
@@ -0,0 +1,6 @@
+</div>
+ <br class="clear"/>
+</div>
+
+</body>
+</html>
\ No newline at end of file
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/header.jsp 2008-02-09 03:13:21 UTC (rev 9881)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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" xml:lang="en" lang="en">
+<head>
+<title>Portlet Container 2.0</title>
+<link rel="stylesheet" href="${pageContext.request.contextPath}/css/master.css" type="text/css"/>
+</head>
+<body>
+
+<div id="container" class="full-width">
+ <div class="header full-width">
+ <div class="float-left three-quarter-width logo"></div>
+ <div class="float-right quarter-width pc20"><img src="/simple/images/pc20.gif" alt="Portlet Container 2.0"/></div>
+ <br class="clear"/>
+ </div>
+ <%@ include file="nav/main.jsp" %>
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp 2008-02-09 02:34:45 UTC (rev 9880)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp 2008-02-09 03:13:21 UTC (rev 9881)
@@ -3,6 +3,7 @@
<%@ taglib prefix="jbp" tagdir="/WEB-INF/tags/portal" %>
<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
<%@ page isELIgnored="false" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -11,10 +12,11 @@
<div class="nav full-width">
<ul>
<li>
- <a href="${pageContext.request.contextPath}/layouts/default.jsp" class="selected">Home</a>
+
+ <a href="${pageContext.request.contextPath}/demo/home.jsp" class="${fn:substringAfter(pageContext.request.servletPath, 'demo/') == 'home.jsp' ? 'selected' : ''}">Home</a>
</li>
<li>
- <a href="${pageContext.request.contextPath}/layouts/demo.jsp">Demo Portlets</a>
+ <a href="${pageContext.request.contextPath}/demo/demo.jsp" class="${fn:substringAfter(pageContext.request.servletPath, 'demo/') == 'demo.jsp' ? 'selected' : ''}">Demo Portlets</a>
</li>
</ul>
<br class="clear"/>
16 years, 5 months
JBoss Portal SVN: r9880 - in modules/portlet/trunk/test/src/test/resources/simple-portal-war: css and 2 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-02-08 21:34:45 -0500 (Fri, 08 Feb 2008)
New Revision: 9880
Added:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/demo.jsp
Modified:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/layout1.tag
modules/portlet/trunk/test/src/test/resources/simple-portal-war/css/master.css
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp
Log:
home page changes and cleanup, new page layout
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/layout1.tag
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/layout1.tag 2008-02-09 00:11:22 UTC (rev 9879)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/layout1.tag 2008-02-09 02:34:45 UTC (rev 9880)
@@ -4,15 +4,14 @@
<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
+ <div class="third-width float-left">
+ <jsp:invoke fragment="leftcol"/>
+ </div>
+ <div class="two-third-width float-left">
+ <jsp:invoke fragment="rightcol"/>
+ </div>
- <div class="third-width float-left">
- <jsp:invoke fragment="leftcol"/>
- </div>
- <div class="two-third-width float-left">
- <jsp:invoke fragment="rightcol"/>
- </div>
-
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/css/master.css
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/css/master.css 2008-02-09 00:11:22 UTC (rev 9879)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/css/master.css 2008-02-09 02:34:45 UTC (rev 9880)
@@ -103,6 +103,13 @@
padding: 0;
}
+h2.title {
+ font-size: 1.9em;
+ color: #fff;
+ margin: 0;
+ padding: 0;
+}
+
h3 {
font-size: 1.0em;
color: #fff;
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp 2008-02-09 00:11:22 UTC (rev 9879)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp 2008-02-09 02:34:45 UTC (rev 9880)
@@ -5,12 +5,12 @@
<%@ page isELIgnored="false" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
-PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ 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" xml:lang="en" lang="en">
<head>
- <title>Portlet Container 2.0</title>
- <link rel="stylesheet" href="/simple/css/master.css" type="text/css"/>
+<title>Portlet Container 2.0</title>
+<link rel="stylesheet" href="${pageContext.request.contextPath}/css/master.css" type="text/css"/>
</head>
<body>
@@ -24,18 +24,79 @@
<div id="content">
<portal:page>
- <portal:pageparam namespaceURI="urn:jboss:portal:simple:google" localName="zipcode" value="80201"/>
- <jbp:layout1>
- <jsp:attribute name="leftcol">
- <jbp:portlet name="RemoteControl" applicationName="remotecontrol-portlet"/>
- <jbp:portlet name="Foo" applicationName="bar"/>
- <jbp:portlet name="ErrorPortlet" applicationName="samples-basic"/>
- </jsp:attribute>
- <jsp:attribute name="rightcol">
- <jbp:portlet name="GoogleMap" applicationName="google-map-portlet"/>
- <jbp:portlet name="GoogleWeather" applicationName="google-weather-portlet"/>
- </jsp:attribute>
- </jbp:layout1>
+ <div class="home-content full-width">
+ <div class="third-width float-right">
+ <jbp:portlet name="GoogleMap" applicationName="google-map-portlet" />
+ </div>
+ <h2 class="title">Demo Page Title</h2>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
+ dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
+ ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+ mollit anim id est laborum.
+ <br/>
+ </div>
+
</portal:page>
</div>
<br class="clear"/>
Copied: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/demo.jsp (from rev 9874, modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/default.jsp)
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/demo.jsp (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/demo.jsp 2008-02-09 02:34:45 UTC (rev 9880)
@@ -0,0 +1,47 @@
+<%@ page contentType="text/html" %>
+<%@ page language="java" %>
+<%@ taglib prefix="jbp" tagdir="/WEB-INF/tags/portal" %>
+<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
+<%@ page isELIgnored="false" %>
+<?xml version="1.0" encoding="UTF-8"?>
+<!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" xml:lang="en" lang="en">
+<head>
+<title>Portlet Container 2.0</title>
+<link rel="stylesheet" href="${pageContext.request.contextPath}/css/master.css" type="text/css"/>
+</head>
+<body>
+
+<div id="container" class="full-width">
+ <div class="header full-width">
+ <div class="float-left three-quarter-width logo"></div>
+ <div class="float-right quarter-width pc20">
+ <img src="${pageContext.request.contextPath}/images/pc20.gif" alt=""/>
+ </div>
+ <br class="clear"/>
+ </div>
+ <%@ include file="nav/main.jsp" %>
+
+ <div id="content">
+ <portal:page>
+ <portal:pageparam namespaceURI="urn:jboss:portal:simple:google" localName="zipcode" value="80201"/>
+ <jbp:layout1>
+ <jsp:attribute name="leftcol">
+ <jbp:portlet name="RemoteControl" applicationName="remotecontrol-portlet"/>
+ <jbp:portlet name="Foo" applicationName="bar"/>
+ <jbp:portlet name="ErrorPortlet" applicationName="samples-basic"/>
+ </jsp:attribute>
+ <jsp:attribute name="rightcol">
+ <jbp:portlet name="GoogleMap" applicationName="google-map-portlet"/>
+ <jbp:portlet name="GoogleWeather" applicationName="google-weather-portlet"/>
+ </jsp:attribute>
+ </jbp:layout1>
+ </portal:page>
+ </div>
+ <br class="clear"/>
+</div>
+
+</body>
+</html>
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp 2008-02-09 00:11:22 UTC (rev 9879)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/layouts/nav/main.jsp 2008-02-09 02:34:45 UTC (rev 9880)
@@ -5,20 +5,17 @@
<%@ page isELIgnored="false" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
-PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<div class="nav full-width">
- <ul>
- <li>
- <a href="${pageContext.request.contextPath}/layouts/default.jsp?page=home" class="selected">Home</a>
- </li>
- <li>
- <a href="${pageContext.request.contextPath}/layouts/default.jsp?page=wikipedia">Wikipedia</a>
- </li>
- <li>
- <a href="">option3</a>
- </li>
- </ul>
- <br class="clear"/>
-</div>
+ <div class="nav full-width">
+ <ul>
+ <li>
+ <a href="${pageContext.request.contextPath}/layouts/default.jsp" class="selected">Home</a>
+ </li>
+ <li>
+ <a href="${pageContext.request.contextPath}/layouts/demo.jsp">Demo Portlets</a>
+ </li>
+ </ul>
+ <br class="clear"/>
+ </div>
16 years, 5 months