JBoss Portal SVN: r10709 - in branches/JBoss_Portal_Branch_2_7: faces/src/main/org/jboss/portal/faces/component/portlet and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-24 08:47:26 -0400 (Thu, 24 Apr 2008)
New Revision: 10709
Added:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletEventEvent.java
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
Log:
- A bit more on the Content framework eventing mechanism
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-04-24 10:47:47 UTC (rev 10708)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-04-24 12:47:26 UTC (rev 10709)
@@ -35,10 +35,12 @@
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.faces.component.portlet.PortletActionEvent;
+import org.jboss.portal.faces.component.portlet.PortletEventEvent;
import org.jboss.portal.faces.component.portlet.PortletRenderEvent;
import org.jboss.portal.faces.el.PropertyValue;
import org.jboss.portal.faces.el.dynamic.DynamicBean;
import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse.Event;
import org.jboss.portal.theme.LayoutService;
import org.jboss.portal.theme.PortalLayout;
import org.jboss.portal.theme.ThemeConstants;
@@ -384,18 +386,30 @@
// Keep window name and region defined
setWindowName(((String[])renderParams.get("windowName"))[0]);
}
+ else if (event instanceof PortletEventEvent)
+ {
+ PortletEventEvent eventEvent = (PortletEventEvent)event;
+ // TODO: Check the QName of the event
+ Event portletEvent = eventEvent.getEvent();
+ String uri = (String)portletEvent.getPayload();
+ this.selectedContentURI = uri;
+ // TODO: Get params from the payload (for widgets)
+ this.selectedContentParameters = new HashMap();
+ }
else if (event instanceof PortletActionEvent)
{
PortletActionEvent actionEvent = (PortletActionEvent)event;
Map actionParams = actionEvent.getParameterMap();
+ /*
// Keep window name and region defined
String[] windowNames = ((String[])actionParams.get("windowName"));
if (windowNames != null && windowNames.length > 0)
{
setWindowName(windowNames[0]);
}
-
+ */
+ /*
//
if (actionParams.get(CONTENT_ACTION_SELECT) != null)
{
@@ -423,6 +437,7 @@
this.selectedContentParameters = parameters;
}
}
+ */
}
}
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-04-24 10:47:47 UTC (rev 10708)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-04-24 12:47:26 UTC (rev 10709)
@@ -33,10 +33,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.xml.namespace.QName;
-import java.io.Serializable;
-import java.util.List;
import java.util.Map;
/**
@@ -107,6 +104,8 @@
}
this.windowState = WindowState.create(windowState);
}
+
+ protected PortletInvocationResponse pir;
void execute(FacesContext faces)
{
@@ -121,7 +120,7 @@
//
try
{
- PortletInvocationResponse pir = invocation.action(portlet, mode, windowState, ParametersStateString.create(interactionState));
+ pir = invocation.action(portlet, mode, windowState, ParametersStateString.create(interactionState));
if (pir instanceof UpdateNavigationalStateResponse)
{
UpdateNavigationalStateResponse response = (UpdateNavigationalStateResponse)pir;
@@ -140,6 +139,7 @@
{
uiportlet.setInternalMode(response.getMode());
}
+
}
}
catch (PortletInvokerException e)
Added: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletEventEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletEventEvent.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletEventEvent.java 2008-04-24 12:47:26 UTC (rev 10709)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.faces.component.portlet;
+
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class PortletEventEvent extends PortletEvent
+{
+ /** . */
+ private final ParameterMap interactionState;
+
+ /** . */
+ private UpdateNavigationalStateResponse.Event event;
+
+ public PortletEventEvent(UIComponent uiComponent, ParameterMap interactionState, UpdateNavigationalStateResponse.Event event)
+ {
+ // FIXME PortletEventEvent constructor
+ super(uiComponent);
+ this.event = event;
+ this.interactionState = interactionState;
+ }
+
+ public UpdateNavigationalStateResponse.Event getEvent()
+ {
+ return event;
+ }
+
+ public Map getParameterMap()
+ {
+ return interactionState;
+ }
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-04-24 10:47:47 UTC (rev 10708)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-04-24 12:47:26 UTC (rev 10709)
@@ -24,6 +24,7 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.faces.util.ActionEventDispatcher;
import org.jboss.portal.portlet.Portlet;
@@ -35,6 +36,7 @@
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import javax.faces.component.UICommand;
import javax.faces.context.FacesContext;
@@ -45,11 +47,13 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
import javax.portlet.ActionRequest;
+import javax.portlet.EventRequest;
import javax.portlet.RenderRequest;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -376,6 +380,22 @@
//
pevent.execute(faces);
+
+ if (pevent instanceof PortletActionEvent)
+ {
+ PortletActionEvent actionEvent = (PortletActionEvent)pevent;
+ if (actionEvent.pir instanceof UpdateNavigationalStateResponse)
+ {
+ UpdateNavigationalStateResponse response = (UpdateNavigationalStateResponse)actionEvent.pir;
+
+ // This is a Hack
+ List<UpdateNavigationalStateResponse.Event> events = response.getEvents();
+ for (UpdateNavigationalStateResponse.Event tmpEvent: events)
+ {
+ queueEvent(new PortletEventEvent(this, ParameterMap.clone(actionEvent.getParameterMap()), tmpEvent));
+ }
+ }
+ }
}
else
{
@@ -487,6 +507,10 @@
paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
queueEvent(paevent);
}
+ else if (obj instanceof EventRequest)
+ {
+ throw new NotYetImplemented();
+ }
}
}
16 years
JBoss Portal SVN: r10708 - branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-24 06:47:47 -0400 (Thu, 24 Apr 2008)
New Revision: 10708
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
Log:
Useless hack
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-04-24 08:58:30 UTC (rev 10707)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-04-24 10:47:47 UTC (rev 10708)
@@ -124,35 +124,21 @@
PortletInvocationResponse pir = invocation.action(portlet, mode, windowState, ParametersStateString.create(interactionState));
if (pir instanceof UpdateNavigationalStateResponse)
{
- UpdateNavigationalStateResponse render = (UpdateNavigationalStateResponse)pir;
+ UpdateNavigationalStateResponse response = (UpdateNavigationalStateResponse)pir;
- // This is a Hack
- List<UpdateNavigationalStateResponse.Event> events = render.getEvents();
- for (UpdateNavigationalStateResponse.Event event: events)
- {
- if (event.getName().equals(new QName("urn:jboss:portal:content", "select")))
- {
- Serializable payload = event.getPayload();
- interactionState.setValue("content.action.select", "true");
- interactionState.setValue("content.uri", payload.toString());
- }
- }
-
-
-
//
- uiportlet.setInternalNavState(((ParametersStateString)render.getNavigationalState()).getParameters());
+ uiportlet.setInternalNavState(((ParametersStateString)response.getNavigationalState()).getParameters());
//
- if (render.getWindowState() != null)
+ if (response.getWindowState() != null)
{
- uiportlet.setInternalWindowState(render.getWindowState());
+ uiportlet.setInternalWindowState(response.getWindowState());
}
//
- if (render.getMode() != null)
+ if (response.getMode() != null)
{
- uiportlet.setInternalMode(render.getMode());
+ uiportlet.setInternalMode(response.getMode());
}
}
}
16 years
JBoss Portal SVN: r10707 - tags/JBoss_Portal_2_6_3/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-24 04:58:30 -0400 (Thu, 24 Apr 2008)
New Revision: 10707
Modified:
tags/JBoss_Portal_2_6_3/build/build-thirdparty.xml
Log:
Oups
Modified: tags/JBoss_Portal_2_6_3/build/build-thirdparty.xml
===================================================================
--- tags/JBoss_Portal_2_6_3/build/build-thirdparty.xml 2008-04-23 20:32:48 UTC (rev 10706)
+++ tags/JBoss_Portal_2_6_3/build/build-thirdparty.xml 2008-04-24 08:58:30 UTC (rev 10707)
@@ -51,7 +51,7 @@
<componentref name="jboss-portal/modules/web" version="1.1.0"/>
<componentref name="jboss-portal/modules/test" version="1.0.1"/>
<componentref name="jboss-portal/modules/portlet" version="1.0.1"/>
- <componentref name="jboss-portal/modules/identity" version="1.0.1/>
+ <componentref name="jboss-portal/modules/identity" version="1.0.1"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
<componentref name="jackrabbit" version="1.1.1"/>
16 years
JBoss Portal SVN: r10706 - branches/JBoss_Portal_2_6_3_JBPORTAL-2000/build.
by portal-commits@lists.jboss.org
Author: mmillson
Date: 2008-04-23 16:32:48 -0400 (Wed, 23 Apr 2008)
New Revision: 10706
Modified:
branches/JBoss_Portal_2_6_3_JBPORTAL-2000/build/build-thirdparty.xml
Log:
Fix typo that exists in JBoss_Portal_2_6_3 tag.
Modified: branches/JBoss_Portal_2_6_3_JBPORTAL-2000/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_2_6_3_JBPORTAL-2000/build/build-thirdparty.xml 2008-04-23 20:06:36 UTC (rev 10705)
+++ branches/JBoss_Portal_2_6_3_JBPORTAL-2000/build/build-thirdparty.xml 2008-04-23 20:32:48 UTC (rev 10706)
@@ -51,7 +51,7 @@
<componentref name="jboss-portal/modules/web" version="1.1.0"/>
<componentref name="jboss-portal/modules/test" version="1.0.1"/>
<componentref name="jboss-portal/modules/portlet" version="1.0.1"/>
- <componentref name="jboss-portal/modules/identity" version="1.0.1/>
+ <componentref name="jboss-portal/modules/identity" version="1.0.1"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
<componentref name="jackrabbit" version="1.1.1"/>
16 years
JBoss Portal SVN: r10705 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/ui/content/portlet and 6 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-23 16:06:36 -0400 (Wed, 23 Apr 2008)
New Revision: 10705
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/build.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFServerContext.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/PortletApplicationModelFactory.java
Log:
Content framework adaptation with a temporary hack
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-04-23 20:06:36 UTC (rev 10705)
@@ -39,10 +39,8 @@
import org.jboss.portal.core.model.portal.control.page.PageControlContext;
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.invocation.RenderInvocation;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
-import javax.xml.namespace.QName;
import java.util.Map;
/**
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2008-04-23 20:06:36 UTC (rev 10705)
@@ -39,6 +39,8 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.xml.namespace.QName;
+
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -73,10 +75,11 @@
{
if ((req.getPortletMode().equals(EDIT_CONTENT)))
{
- String uri = req.getParameter("content.uri");
+ String uri = req.getParameter("content_uri");
if (uri != null)
{
- resp.setRenderParameter("content.uri", uri);
+ resp.setRenderParameter("content_uri", uri);
+ resp.setEvent(new QName("urn:jboss:portal:content", "select"), uri);
}
}
}
@@ -100,7 +103,7 @@
protected void getContent(RenderRequest req, RenderResponse resp, boolean newContent) throws PortletException, PortletSecurityException, IOException
{
- String selectedURI = req.getParameter("content.uri");
+ String selectedURI = req.getParameter("content_uri");
//
resp.setContentType("text/html");
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-23 20:06:36 UTC (rev 10705)
@@ -133,7 +133,7 @@
%>
<portlet:actionURL var="url">
<portlet:param name="content.action.select" value="true"/>
- <portlet:param name="content.uri" value="<%= instance.getId() %>"/>
+ <portlet:param name="content_uri" value="<%= instance.getId() %>"/>
</portlet:actionURL>
<div style="display:none">
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml 2008-04-23 20:06:36 UTC (rev 10705)
@@ -23,10 +23,10 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<portlet-app
- xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ 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_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
+ 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>Portlet providing user login/logout and profile management</description>
<portlet-name>UserPortlet</portlet-name>
@@ -124,6 +124,7 @@
<title>Portlet Content Portlet</title>
<keywords>management,admin</keywords>
</portlet-info>
+ <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
</portlet>
<user-attribute>
<name>user.name.nickName</name>
@@ -137,4 +138,10 @@
<user-attribute>
<name>user.name.family</name>
</user-attribute>
+
+ <event-definition>
+ <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+
</portlet-app>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/build.xml 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/build.xml 2008-04-23 20:06:36 UTC (rev 10705)
@@ -102,6 +102,7 @@
<path refid="el.el.classpath"/>
<path refid="richfaces.richfaces.classpath"/>
<path refid="facelets.facelets.classpath"/>
+ <path refid="portlet.portlet.classpath"/>
<pathelement location="${source.etc}/sun-jsf/portletbridge-api-1.0.0-SNAPSHOT.jar"/>
<pathelement location="${source.etc}/sun-jsf/portletbridge-impl-1.0.0-SNAPSHOT.jar"/>
</path>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2008-04-23 20:06:36 UTC (rev 10705)
@@ -23,10 +23,10 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<portlet-app
- xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ 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_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
+ 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>Administration Portlet</description>
<portlet-name>AdminPortlet</portlet-name>
@@ -71,5 +71,14 @@
<title>Dashboard Configurator Portlet</title>
<keywords>management,admin</keywords>
</portlet-info>
+
+ <supported-processing-event xmlns:x="urn:jboss:portal:content">x:select</supported-processing-event>
+
</portlet>
+
+ <event-definition>
+ <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+
</portlet-app>
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-23 20:06:36 UTC (rev 10705)
@@ -30,7 +30,9 @@
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.ActionURL;
import org.jboss.portal.portlet.ContainerURL;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
@@ -116,7 +118,7 @@
this.serverContext = new JSFServerContext(this);
}
- String renderURL(ContainerURL containerURL, StateString navigationalState, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
+ String renderURL(ContainerURL containerURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
{
ViewHandler vh = faces.getApplication().getViewHandler();
String viewId = faces.getViewRoot().getViewId();
@@ -130,22 +132,27 @@
PortletURL portletURL = (PortletURL)containerURL;
- //
- PortletRequestEncoder encoder = new PortletRequestEncoder();
- encoder.encodeRender(navigationalState, portletURL.getMode(), portletURL.getWindowState());
- for (Iterator i = encoder.getQueryParameters().entrySet().iterator(); i.hasNext();)
+ if (portletURL instanceof ActionURL)
{
- Map.Entry entry = (Map.Entry)i.next();
- String name = FastURLEncoder.getUTF8Instance().encode((String)entry.getKey());
- String[] values = (String[])entry.getValue();
- for (int j = 0; j < values.length; j++)
+ ActionURL actionPortletURL = (ActionURL)portletURL;
+
+ //
+ PortletRequestEncoder encoder = new PortletRequestEncoder();
+ encoder.encodeRender(actionPortletURL.getInteractionState(), portletURL.getMode(), portletURL.getWindowState());
+ for (Iterator i = encoder.getQueryParameters().entrySet().iterator(); i.hasNext();)
{
- String value = values[j];
- url.append("&").append(name).append('=');
- FastURLEncoder.getUTF8Instance().encode(value, url);
+ Map.Entry entry = (Map.Entry)i.next();
+ String name = FastURLEncoder.getUTF8Instance().encode((String)entry.getKey());
+ String[] values = (String[])entry.getValue();
+ for (int j = 0; j < values.length; j++)
+ {
+ String value = values[j];
+ url.append("&").append(name).append('=');
+ FastURLEncoder.getUTF8Instance().encode(value, url);
+ }
}
}
-
+
//
return url.toString();
}
@@ -154,14 +161,14 @@
Portlet portlet,
Mode mode,
WindowState windowState,
- StateString navigationalState,
StateString interactionState) throws PortletInvokerException
{
- PortletInvocationContext portletInvocationContext = new JSFPortletInvocationContext(clientRequest, clientResponse, new MarkupInfo(MediaType.TEXT_HTML, "UTF-8"), navigationalState, this);
+ PortletInvocationContext portletInvocationContext = new JSFPortletInvocationContext(clientRequest, clientResponse, new MarkupInfo(MediaType.TEXT_HTML, "UTF-8"), this);
//
- PortletInvocation action = new ActionInvocation(portletInvocationContext);
-
+ ActionInvocation action = new ActionInvocation(portletInvocationContext);
+ action.setInteractionState(interactionState);
+
if (mode != null)
{
action.setMode(mode);
@@ -191,10 +198,11 @@
ParameterMap navState) throws PortletInvokerException
{
- PortletInvocationContext portletInvocationContext = new JSFPortletInvocationContext(clientRequest, clientResponse, new MarkupInfo(MediaType.TEXT_HTML, "UTF-8"), null, this);
+ PortletInvocationContext portletInvocationContext = new JSFPortletInvocationContext(clientRequest, clientResponse, new MarkupInfo(MediaType.TEXT_HTML, "UTF-8"), this);
//
PortletInvocation render = new RenderInvocation(portletInvocationContext);
+ render.setNavigationalState(ParametersStateString.create(navState));
if (mode != null)
{
@@ -248,7 +256,7 @@
private StateString navigationalState;
- public JSFPortletInvocationContext(HttpServletRequest clientRequest, HttpServletResponse clientResponse, MarkupInfo markupInfo, StateString navigationalState, JSFInvocation invocation)
+ public JSFPortletInvocationContext(HttpServletRequest clientRequest, HttpServletResponse clientResponse, MarkupInfo markupInfo, JSFInvocation invocation)
{
super(markupInfo);
@@ -258,8 +266,6 @@
this.clientRequest = clientRequest;
this.clientResponse = clientResponse;
this.invocation = invocation;
- this.navigationalState = navigationalState;
-
//
addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
@@ -281,7 +287,7 @@
public String renderURL(ContainerURL containerURL, URLFormat urlFormat)
{
- return invocation.renderURL(containerURL, navigationalState, urlFormat.getWantSecure(), urlFormat.getWantAuthenticated(), urlFormat.getWantRelative());
+ return invocation.renderURL(containerURL, urlFormat.getWantSecure(), urlFormat.getWantAuthenticated(), urlFormat.getWantRelative());
}
}
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFServerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFServerContext.java 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFServerContext.java 2008-04-23 20:06:36 UTC (rev 10705)
@@ -22,23 +22,12 @@
******************************************************************************/
package org.jboss.portal.faces.component.portlet;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.common.invocation.EmptyAttributeResolver;
-import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
-import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
-import org.jboss.portal.common.invocation.resolver.RequestAttributeResolver;
-import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
-import org.jboss.portal.portlet.ParametersStateString;
-import org.jboss.portal.portlet.PortletURL;
-import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
-import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
-import org.jboss.portal.portlet.invocation.PortletInvocation;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.jboss.portal.portlet.PortletURL;
+import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 10090 $
@@ -78,6 +67,6 @@
public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
{
- return invocation.renderURL(portletURL, null, wantSecure, wantAuthenticated, relative);
+ return invocation.renderURL(portletURL, wantSecure, wantAuthenticated, relative);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-04-23 20:06:36 UTC (rev 10705)
@@ -33,6 +33,10 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.xml.namespace.QName;
+
+import java.io.Serializable;
+import java.util.List;
import java.util.Map;
/**
@@ -117,11 +121,25 @@
//
try
{
- PortletInvocationResponse pir = invocation.action(portlet, mode, windowState, null, ParametersStateString.create(interactionState));
+ PortletInvocationResponse pir = invocation.action(portlet, mode, windowState, ParametersStateString.create(interactionState));
if (pir instanceof UpdateNavigationalStateResponse)
{
UpdateNavigationalStateResponse render = (UpdateNavigationalStateResponse)pir;
+ // This is a Hack
+ List<UpdateNavigationalStateResponse.Event> events = render.getEvents();
+ for (UpdateNavigationalStateResponse.Event event: events)
+ {
+ if (event.getName().equals(new QName("urn:jboss:portal:content", "select")))
+ {
+ Serializable payload = event.getPayload();
+ interactionState.setValue("content.action.select", "true");
+ interactionState.setValue("content.uri", payload.toString());
+ }
+ }
+
+
+
//
uiportlet.setInternalNavState(((ParametersStateString)render.getNavigationalState()).getParameters());
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-04-23 20:06:36 UTC (rev 10705)
@@ -44,6 +44,9 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import javax.portlet.ActionRequest;
+import javax.portlet.RenderRequest;
+
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
@@ -427,6 +430,8 @@
{
String clientId = getClientId(faces);
String clientIdValue = (String)faces.getExternalContext().getRequestParameterMap().get(clientId);
+
+ Object obj = faces.getExternalContext().getRequest();
// We have been targetted
if ("jbp".equals(clientIdValue))
@@ -454,35 +459,33 @@
Mode mode = decoder.getMode();
WindowState windowState = decoder.getWindowState();
- //
- switch (decoder.getType())
+ if (obj instanceof RenderRequest)
{
- case PortletRequestDecoder.RENDER_TYPE:
- PortletRenderEvent prevent = new PortletRenderEvent(
+ PortletRenderEvent prevent = new PortletRenderEvent(
this,
((ParametersStateString)decoder.getNavigationalState()).getParameters(),
mode,
windowState);
- prevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
- queueEvent(prevent);
- break;
- case PortletRequestDecoder.ACTION_TYPE:
- if (mode == null)
- {
- mode = getInternalMode();
- }
- if (windowState == null)
- {
- windowState = getInternalWindowState();
- }
- PortletActionEvent paevent = new PortletActionEvent(
+ prevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ queueEvent(prevent);
+ }
+ else if (obj instanceof ActionRequest)
+ {
+ if (mode == null)
+ {
+ mode = getInternalMode();
+ }
+ if (windowState == null)
+ {
+ windowState = getInternalWindowState();
+ }
+ PortletActionEvent paevent = new PortletActionEvent(
this,
- ((ParametersStateString)decoder.getInteractionState()).getParameters(),
+ ParameterMap.clone(((ActionRequest)obj).getParameterMap()),
mode,
windowState);
- paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
- queueEvent(paevent);
- break;
+ paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ queueEvent(paevent);
}
}
}
Modified: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/PortletApplicationModelFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/PortletApplicationModelFactory.java 2008-04-23 19:40:44 UTC (rev 10704)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/PortletApplicationModelFactory.java 2008-04-23 20:06:36 UTC (rev 10705)
@@ -672,14 +672,8 @@
if (object instanceof EventDefinitionReferenceMetaData)
{
EventDefinitionReferenceMetaData md = (EventDefinitionReferenceMetaData)object;
- if ("qname".equals(localName))
- {
- md.setQname(nav.resolveQName(value));
- }
- else if ("name".equals(localName))
- {
- md.setName(value);
- }
+
+ md.setQname(nav.resolveQName(value));
}
// custom-portlet-mode
16 years
JBoss Portal SVN: r10704 - branches.
by portal-commits@lists.jboss.org
Author: mmillson
Date: 2008-04-23 15:40:44 -0400 (Wed, 23 Apr 2008)
New Revision: 10704
Added:
branches/JBoss_Portal_2_6_3_JBPORTAL-2000/
Log:
Create JBPORTAL-2000 patch branch from JBoss_Portal_2_6_3 tag
Copied: branches/JBoss_Portal_2_6_3_JBPORTAL-2000 (from rev 10703, tags/JBoss_Portal_2_6_3)
16 years
JBoss Portal SVN: r10703 - modules/portlet/tags/JBP_PORTLET_1_0_3/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-23 04:11:55 -0400 (Wed, 23 Apr 2008)
New Revision: 10703
Modified:
modules/portlet/tags/JBP_PORTLET_1_0_3/build/build-thirdparty.xml
modules/portlet/tags/JBP_PORTLET_1_0_3/build/build.xml
Log:
Tagged as GA
Use common 1.2.0
Modified: modules/portlet/tags/JBP_PORTLET_1_0_3/build/build-thirdparty.xml
===================================================================
--- modules/portlet/tags/JBP_PORTLET_1_0_3/build/build-thirdparty.xml 2008-04-23 08:07:04 UTC (rev 10702)
+++ modules/portlet/tags/JBP_PORTLET_1_0_3/build/build-thirdparty.xml 2008-04-23 08:11:55 UTC (rev 10703)
@@ -46,7 +46,7 @@
are pushed to the http://repository.jboss.com site.
-->
- <componentref name="jboss-portal/modules/common" version="1.1.0"/>
+ <componentref name="jboss-portal/modules/common" version="1.2.0"/>
<componentref name="jboss-portal/modules/web" version="1.1.0"/>
<componentref name="jboss-portal/modules/test" version="1.0.1"/>
<componentref name="sun-servlet" version="2.4"/>
Modified: modules/portlet/tags/JBP_PORTLET_1_0_3/build/build.xml
===================================================================
--- modules/portlet/tags/JBP_PORTLET_1_0_3/build/build.xml 2008-04-23 08:07:04 UTC (rev 10702)
+++ modules/portlet/tags/JBP_PORTLET_1_0_3/build/build.xml 2008-04-23 08:11:55 UTC (rev 10703)
@@ -62,7 +62,7 @@
<property name="version.major" value="1"/>
<property name="version.minor" value="0"/>
<property name="version.revision" value="3"/>
- <property name="version.tag" value="SNAPSHOT"/>
+ <property name="version.tag" value="GA"/>
<property name="version.name" value=""/>
<!-- This must be set to the CVS tag for any release -->
16 years
JBoss Portal SVN: r10702 - tags and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-23 04:07:04 -0400 (Wed, 23 Apr 2008)
New Revision: 10702
Added:
modules/portlet/tags/JBP_PORTLET_1_0_3/
Removed:
tags/JBP_PORTLET_1_0_3/
Log:
Oups
Copied: modules/portlet/tags/JBP_PORTLET_1_0_3 (from rev 10701, tags/JBP_PORTLET_1_0_3)
16 years
JBoss Portal SVN: r10701 - tags.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-23 04:05:02 -0400 (Wed, 23 Apr 2008)
New Revision: 10701
Added:
tags/JBP_PORTLET_1_0_3/
Log:
Tagging Portlet 1.0.3
Copied: tags/JBP_PORTLET_1_0_3 (from rev 10700, modules/portlet/branches/JBP_PORTLET_BRANCH_1_0)
16 years
JBoss Portal SVN: r10700 - in modules/common/tags/JBP_COMMON_1_2_0: common and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-23 03:18:19 -0400 (Wed, 23 Apr 2008)
New Revision: 10700
Modified:
modules/common/tags/JBP_COMMON_1_2_0/common/pom.xml
modules/common/tags/JBP_COMMON_1_2_0/mc/pom.xml
modules/common/tags/JBP_COMMON_1_2_0/pom.xml
modules/common/tags/JBP_COMMON_1_2_0/portal/pom.xml
modules/common/tags/JBP_COMMON_1_2_0/releaseLibs.sh
Log:
Tag common module
Modified: modules/common/tags/JBP_COMMON_1_2_0/common/pom.xml
===================================================================
--- modules/common/tags/JBP_COMMON_1_2_0/common/pom.xml 2008-04-23 07:15:22 UTC (rev 10699)
+++ modules/common/tags/JBP_COMMON_1_2_0/common/pom.xml 2008-04-23 07:18:19 UTC (rev 10700)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.common</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/common/tags/JBP_COMMON_1_2_0/mc/pom.xml
===================================================================
--- modules/common/tags/JBP_COMMON_1_2_0/mc/pom.xml 2008-04-23 07:15:22 UTC (rev 10699)
+++ modules/common/tags/JBP_COMMON_1_2_0/mc/pom.xml 2008-04-23 07:18:19 UTC (rev 10700)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.common</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/common/tags/JBP_COMMON_1_2_0/pom.xml
===================================================================
--- modules/common/tags/JBP_COMMON_1_2_0/pom.xml 2008-04-23 07:15:22 UTC (rev 10699)
+++ modules/common/tags/JBP_COMMON_1_2_0/pom.xml 2008-04-23 07:18:19 UTC (rev 10700)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Common (aggregator)</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<distributionManagement>
<repository>
Modified: modules/common/tags/JBP_COMMON_1_2_0/portal/pom.xml
===================================================================
--- modules/common/tags/JBP_COMMON_1_2_0/portal/pom.xml 2008-04-23 07:15:22 UTC (rev 10699)
+++ modules/common/tags/JBP_COMMON_1_2_0/portal/pom.xml 2008-04-23 07:18:19 UTC (rev 10700)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.common</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/common/tags/JBP_COMMON_1_2_0/releaseLibs.sh
===================================================================
--- modules/common/tags/JBP_COMMON_1_2_0/releaseLibs.sh 2008-04-23 07:15:22 UTC (rev 10699)
+++ modules/common/tags/JBP_COMMON_1_2_0/releaseLibs.sh 2008-04-23 07:18:19 UTC (rev 10700)
@@ -22,6 +22,6 @@
fi
-cp common/target/common-common-1.2.0-SNAPSHOT.jar $loc/portal-common-lib.jar
-cp mc/target/common-mc-1.2.0-SNAPSHOT.jar $loc/portal-common-mc-lib.jar
-cp portal/target/common-portal-1.2.0-SNAPSHOT.jar $loc/portal-common-portal-lib.jar
+cp common/target/common-common-1.2.0.jar $loc/portal-common-lib.jar
+cp mc/target/common-mc-1.2.0.jar $loc/portal-common-mc-lib.jar
+cp portal/target/common-portal-1.2.0.jar $loc/portal-common-portal-lib.jar
16 years