JBoss Portal SVN: r10446 - in modules/presentation/trunk: build and 14 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-01 01:51:13 -0400 (Tue, 01 Apr 2008)
New Revision: 10446
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java
modules/presentation/trunk/presentation/src/main/resources/
modules/presentation/trunk/presentation/src/main/resources/war/
modules/presentation/trunk/presentation/src/main/resources/war/WEB-INF/
modules/presentation/trunk/presentation/src/main/resources/war/WEB-INF/web.xml
Modified:
modules/presentation/trunk/
modules/presentation/trunk/.classpath
modules/presentation/trunk/build/pom.xml
modules/presentation/trunk/presentation/pom.xml
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
Log:
removing dependency on the "org.jboss.portal.server" package
Property changes on: modules/presentation/trunk
___________________________________________________________________
Name: svn:ignore
+ bin
Modified: modules/presentation/trunk/.classpath
===================================================================
--- modules/presentation/trunk/.classpath 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/.classpath 2008-04-01 05:51:13 UTC (rev 10446)
@@ -66,11 +66,11 @@
<classpathentry kind="var" path="M2_REPO/jboss/jboss-system/4.2.0.GA/jboss-system-4.2.0.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/jboss-test/1.0.4.GA/jboss-test-1.0.4.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/jbossas/core-libs/jboss-transaction/4.0.4.GA/jboss-transaction-4.0.4.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit/1.2.0.Beta2/jboss-unit-1.2.0.Beta2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-mc/1.2.0.Beta2/jboss-unit-mc-1.2.0.Beta2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-remote/1.2.0.Beta2/jboss-unit-remote-1.2.0.Beta2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-tooling-ant/1.2.0.Beta2/jboss-unit-tooling-ant-1.2.0.Beta2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-tooling-core/1.2.0.Beta2/jboss-unit-tooling-core-1.2.0.Beta2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit/1.2.0.SNAPSHOT/jboss-unit-1.2.0.SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-mc/1.2.0.SNAPSHOT/jboss-unit-mc-1.2.0.SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-remote/1.2.0.SNAPSHOT/jboss-unit-remote-1.2.0.SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-tooling-ant/1.2.0.SNAPSHOT/jboss-unit-tooling-ant-1.2.0.SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/unit/jboss-unit-tooling-core/1.2.0.SNAPSHOT/jboss-unit-tooling-core-1.2.0.SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta6/jboss-vfs-2.0.0.Beta6.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR4/jbossxb-2.0.0.CR4.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/jbossas/core-libs/jnpserver/4.0.4.GA/jnpserver-4.0.4.GA.jar"/>
@@ -101,5 +101,6 @@
<classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.7.1/xml-apis-2.7.1.jar"/>
<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/httpunit/httpunit/1.6/httpunit-1.6.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Modified: modules/presentation/trunk/build/pom.xml
===================================================================
--- modules/presentation/trunk/build/pom.xml 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/build/pom.xml 2008-04-01 05:51:13 UTC (rev 10446)
@@ -35,11 +35,10 @@
<version.jboss.portal.common>1.2.0.Beta2</version.jboss.portal.common>
<version.jboss.portal.portlet>2.0.0.CR1</version.jboss.portal.portlet>
<version.jboss.portal.web>1.2.0.Beta2</version.jboss.portal.web>
- <version.jboss.unit>1.2.0.Beta2</version.jboss.unit>
+ <version.jboss.unit>1.2.0.SNAPSHOT</version.jboss.unit>
<!--
TODO: figure out how to handle this dependency since they are not mavenized yet
- <version.jboss.portal.server>1.0.1</version.jboss.portal.server>
<version.jboss.portal.jems>1.0.1</version.jboss.portal.jems>
-->
Modified: modules/presentation/trunk/presentation/pom.xml
===================================================================
--- modules/presentation/trunk/presentation/pom.xml 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/pom.xml 2008-04-01 05:51:13 UTC (rev 10446)
@@ -13,21 +13,26 @@
<dependencies>
<dependency>
- <groupId>sun-servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <groupId>sun-servlet</groupId>
+ <artifactId>servlet-api</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>httpunit</groupId>
+ <artifactId>httpunit</artifactId>
+ </dependency>
<dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
</dependency>
- <dependency>
+ <dependency>
<groupId>net.mygwt</groupId>
<artifactId>mygwt</artifactId>
</dependency>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -25,7 +25,6 @@
import org.jboss.portal.presentation.protocol.ServerAction;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIContext;
import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.web.ServletContextDispatcher;
/**
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -35,12 +35,12 @@
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.server.ProcessorRequest;
import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.presentation.server.ServerException;
+import org.jboss.portal.presentation.invocation.PresentationInvocation;
+import org.jboss.portal.presentation.invocation.ClientController;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIContext;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIPage;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIWindow;
-import org.jboss.portal.server.RequestController;
-import org.jboss.portal.server.ServerException;
-import org.jboss.portal.server.ServerInvocation;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -56,7 +56,7 @@
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
*/
-public class AjaxUIController implements RequestController
+public class AjaxUIController implements ClientController
{
/** . */
@@ -72,11 +72,11 @@
* handle is the entry point for handling an incoming Portal request. The request is handed over
* from the Http Layer via the main Portal Servlet
*/
- public void handle(ServerInvocation invocation) throws ServerException
+ public void handle(PresentationInvocation invocation) throws ServerException
{
try
{
- HttpServletRequest request = invocation.getServerContext().getClientRequest();
+ HttpServletRequest request = invocation.getRequest();
/**
* TODO: decouple the implementation via factory pattern
@@ -109,11 +109,11 @@
* @param serverResponse
* @throws ServerException
*/
- private void handle(PresentationContext presentationContext, ServerResponse serverResponse, ServerInvocation invocation) throws ServerException
+ private void handle(PresentationContext presentationContext, ServerResponse serverResponse, PresentationInvocation invocation) throws ServerException
{
try
{
- HttpServletResponse response = invocation.getServerContext().getClientResponse();
+ HttpServletResponse response = invocation.getResponse();
if(serverResponse instanceof ShowUIObjectResponse)
{
ShowUIObjectResponse show = (ShowUIObjectResponse)serverResponse;
@@ -132,7 +132,7 @@
* @param presentationContext
* @param targetId
*/
- private void render(ServerInvocation invocation,PresentationContext presentationContext, String targetId)
+ private void render(PresentationInvocation invocation,PresentationContext presentationContext, String targetId)
{
UIObject uiObject = presentationContext.getUIContext().getObject(targetId);
@@ -203,7 +203,7 @@
}
}
}
- invocation.getServerContext().getClientRequest().setAttribute("uiObject", clientPage);
+ invocation.getRequest().setAttribute("uiObject", clientPage);
}
}
@@ -245,12 +245,12 @@
/**
*
*/
- private ServerAction getServerAction(PresentationContext presentationContext, ServerInvocation invocation)
+ private ServerAction getServerAction(PresentationContext presentationContext, PresentationInvocation invocation)
{
ServerAction action = null;
//Process any window state change incoming requests
- action = (ServerAction)invocation.getServerContext().getClientRequest().getAttribute("serverAction");
+ action = (ServerAction)invocation.getRequest().getAttribute("serverAction");
//Just use ViewUIObject command for now until URL interpretation/mapping
//to ServiceAction is implemented
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -37,10 +37,9 @@
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.server.ProcessorRequest;
import org.jboss.portal.presentation.server.ProcessorResponse;
-import org.jboss.portal.server.RequestController;
-import org.jboss.portal.server.ServerException;
-import org.jboss.portal.server.ServerInvocation;
-import org.jboss.portal.server.impl.ServerInvocationContextImpl;
+import org.jboss.portal.presentation.server.ServerException;
+import org.jboss.portal.presentation.invocation.PresentationInvocation;
+import org.jboss.portal.presentation.invocation.ClientController;
import org.jboss.portal.web.WebRequest;
import javax.servlet.http.HttpServletRequest;
@@ -59,7 +58,7 @@
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
*/
-public class UIController implements RequestController
+public class UIController implements ClientController
{
/** . */
@@ -75,11 +74,11 @@
* handle is the entry point for handling an incoming Portal request. The request is handed over
* from the Http Layer via the main Portal Servlet
*/
- public void handle(ServerInvocation invocation) throws ServerException
+ public void handle(PresentationInvocation invocation) throws ServerException
{
try
{
- HttpServletRequest request = invocation.getServerContext().getClientRequest();
+ HttpServletRequest request = invocation.getRequest();
/**
* TODO: decouple the implementation via factory pattern
@@ -112,11 +111,11 @@
* @param serverResponse
* @throws ServerException
*/
- private void handle(PresentationContext presentationContext, ServerResponse serverResponse, ServerInvocation invocation) throws ServerException
+ private void handle(PresentationContext presentationContext, ServerResponse serverResponse, PresentationInvocation invocation) throws ServerException
{
try
{
- HttpServletResponse response = invocation.getServerContext().getClientResponse();
+ HttpServletResponse response = invocation.getResponse();
if(serverResponse instanceof ShowUIObjectResponse)
{
ShowUIObjectResponse show = (ShowUIObjectResponse)serverResponse;
@@ -175,10 +174,10 @@
/**
*
*/
- private ServerAction getServerAction(PresentationContext presentationContext, ServerInvocation invocation)
+ private ServerAction getServerAction(PresentationContext presentationContext, PresentationInvocation invocation)
{
- String requestPath = invocation.getServerContext().getPortalRequestPath();
- WebRequest webReq = ((ServerInvocationContextImpl)invocation.getContext()).getWebRequest();
+ String requestPath = invocation.getPortalRequestPath();
+ WebRequest webReq = invocation.getRequest();
Map queryParameters = webReq.getQueryParameterMap();
//
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -34,11 +34,7 @@
import org.jboss.portal.presentation.protocol.ServerAction;
import org.jboss.portal.presentation.protocol.UIObjectAction;
import org.jboss.portal.presentation.server.PresentationServer;
-import org.jboss.portal.server.AbstractServerURL;
-import org.jboss.portal.server.ServerInvocation;
-import org.jboss.portal.server.ServerURL;
-import org.jboss.portal.server.request.URLContext;
-import org.jboss.portal.server.request.URLFormat;
+import org.jboss.portal.presentation.invocation.PresentationInvocation;
import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.web.impl.DefaultServletContainerFactory;
@@ -54,7 +50,7 @@
{
/** . */
- private ServerInvocation invocation = null;
+ private PresentationInvocation invocation = null;
/** . */
private PresentationServer presentationServer = null;
@@ -64,7 +60,7 @@
* @param presentationServer
* @param invocation
*/
- public PresentationContextImpl(PresentationServer presentationServer, ServerInvocation invocation)
+ public PresentationContextImpl(PresentationServer presentationServer, PresentationInvocation invocation)
{
this.invocation = invocation;
this.presentationServer = presentationServer;
@@ -75,7 +71,7 @@
*/
public UIContext getUIContext()
{
- HttpSession session = this.invocation.getServerContext().getClientRequest().getSession();
+ HttpSession session = this.invocation.getRequest().getSession();
//Process the UIObjectContainer for this session
UIObjectContainer uiObjectContainer = (UIObjectContainer)session.getAttribute(SessionConstants.serverModel);
@@ -102,7 +98,7 @@
{
AjaxUIContext uiContext = null;
- HttpServletRequest request = this.invocation.getServerContext().getClientRequest();
+ HttpServletRequest request = this.invocation.getRequest();
uiContext = (AjaxUIContext)request.getSession().getAttribute(SessionConstants.ajaxModel);
if(uiContext == null)
{
@@ -124,8 +120,8 @@
{
ServletContainer container = DefaultServletContainerFactory.getInstance().getServletContainer();
return new ServletContextDispatcher(
- invocation.getServerContext().getClientRequest(),
- invocation.getServerContext().getClientResponse(),
+ invocation.getRequest(),
+ invocation.getResponse(),
container);
}
@@ -147,18 +143,20 @@
//
if (objectAction instanceof LinkActivation)
- {
- //StringBuffer portalRequestPath = new StringBuffer("/invoke");
- //createPath(target, portalRequestPath);
-
+ {
StringBuffer portalRequestPath = new StringBuffer();
portalRequestPath.append(targetId);
+ /*
ServerURL url = new AbstractServerURL();
url.setPortalRequestPath(portalRequestPath.toString());
LinkActivation linkActivation = (LinkActivation)objectAction;
url.getParameterMap().putAll(linkActivation.getQueryParameters());
return invocation.getServerContext().renderURL(url, URLContext.newInstance(false, false), URLFormat.newInstance(false, true));
+ */
+ //TODO: render urls
+
+ return null;
}
else
{
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -19,17 +19,8 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.portal.common.invocation.InterceptorStackFactory;
-import org.jboss.portal.server.RequestControllerFactory;
-import org.jboss.portal.server.Server;
-import org.jboss.portal.server.ServerInvocationContext;
-import org.jboss.portal.server.impl.ServerInvocationContextImpl;
-import org.jboss.portal.server.request.URLContext;
-import org.jboss.portal.server.ServerRequest;
-import org.jboss.portal.server.ServerResponse;
-import org.jboss.portal.server.ServerInvocation;
-import org.jboss.portal.server.RequestController;
-import org.jboss.portal.server.RequestControllerDispatcher;
import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
@@ -37,10 +28,12 @@
import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
+import org.jboss.portal.presentation.invocation.PresentationInvocation;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
/**
* This serves as the Portal Entry Point for AJAX (Asynchronous) RPC calls being made by the
* client-side Ajax agent of the Presentation Framework
@@ -53,19 +46,9 @@
/** The logger. */
private Logger log = Logger.getLogger(getClass());
- /**
- *
- */
- private RequestControllerFactory controllerFactory = null;
-
/** The interceptor stack. */
private InterceptorStackFactory interceptorStack = null;
- /**
- *
- */
- private Server portalServer = null;
-
/** Configure the as default servlet. */
public void init() throws ServletException
@@ -73,27 +56,15 @@
try
{
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
-
- //Locate the request controller
- this.controllerFactory = (RequestControllerFactory) MBeanProxy.get(RequestControllerFactory.class, new ObjectName(
- this.getInitParameter("controllerFactoryName")),
- mbeanServer);
-
+
//Locate the interceptor stack factory
this.interceptorStack = (InterceptorStackFactory) MBeanProxy.get(InterceptorStackFactory.class, new ObjectName(
this.getInitParameter("interceptorStackFactoryName")),
- mbeanServer);
-
- //Locate the portal server
- this.portalServer = (Server) MBeanProxy.get(Server.class, new ObjectName(
- this.getInitParameter("portalServerName")),
- mbeanServer);
-
+ mbeanServer);
}
catch (Exception e)
- {
- this.controllerFactory = null;
- this.interceptorStack = null;
+ {
+ this.interceptorStack = null;
String msg = "Ajax Portal Entry point could not be created";
log.error(msg, e);
throw new UnavailableException(msg);
@@ -303,42 +274,13 @@
{
HttpServletRequest req = this.getThreadLocalRequest();
HttpServletResponse resp = this.getThreadLocalResponse();
- String requestURI = req.getRequestURI();
- String contextPath = req.getContextPath();
- String portalHost = req.getServerName();
- String portalRequestPath = requestURI.substring(contextPath.length());
- String portalContextPath = requestURI.substring(0, contextPath.length());
- URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
-
+
WebRequest webReq = new WebRequest(req);
-
- //
- ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
- req,
- resp,
- webReq,
- portalHost,
- portalRequestPath,
- portalContextPath,
- urlContext
- );
+ WebResponse webResp = new WebResponse(resp);
+ PresentationInvocation invocation = new PresentationInvocation(webReq, webResp);
- //
- ServerRequest request = new ServerRequest(invocationCtx);
- request.setServer(this.portalServer);
-
- //
- ServerResponse response = new ServerResponse(request, invocationCtx);
-
- //
- ServerInvocation invocation = new ServerInvocation(invocationCtx);
- invocation.setRequest(request);
- invocation.setResponse(response);
-
- //
- RequestController controller = this.controllerFactory.createRequestController(invocation);
- invocation.setHandler(new RequestControllerDispatcher(controller));
-
+ //TODO: set the proper invocation handler here
+
invocation.invoke(this.interceptorStack.getInterceptorStack());
}
}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * 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.presentation.invocation;
+
+import org.jboss.portal.presentation.server.ServerException;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface ClientController
+{
+ /**
+ *
+ * @param invocation
+ * @throws ServerException
+ */
+ public void handle(PresentationInvocation invocation) throws ServerException;
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -0,0 +1,117 @@
+/******************************************************************************
+ * 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.presentation.invocation;
+
+import org.jboss.portal.common.invocation.Invocation;
+import org.jboss.portal.common.invocation.InvocationContext;
+
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
+
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PresentationInvocation extends Invocation
+{
+ private InvocationContext context = null;
+ private WebRequest request = null;
+ private WebResponse response = null;
+
+ /**
+ *
+ * @param request
+ */
+ public PresentationInvocation(WebRequest request, WebResponse response)
+ {
+ this.request = request;
+ this.response = response;
+ this.context = new PresentationInvocationContext();
+ }
+
+ /**
+ *
+ */
+ public InvocationContext getContext() throws IllegalStateException
+ {
+ return this.context;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public WebRequest getRequest()
+ {
+ return this.request;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public WebResponse getResponse()
+ {
+ return this.response;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getPortalHost()
+ {
+ return this.request.getServerName();
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getPortalRequestPath()
+ {
+ String portalRequestPath = null;
+
+ String requestURI = request.getRequestURI();
+ String contextPath = request.getContextPath();
+ portalRequestPath = requestURI.substring(contextPath.length());
+
+ return portalRequestPath;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getPortalContextPath()
+ {
+ String portalContextPath = null;
+
+ String requestURI = request.getRequestURI();
+ String contextPath = request.getContextPath();
+ portalContextPath = requestURI.substring(0, contextPath.length());
+
+ return portalContextPath;
+ }
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * 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.presentation.invocation;
+
+import org.jboss.portal.common.invocation.AbstractInvocationContext;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PresentationInvocationContext extends AbstractInvocationContext
+{
+
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.presentation.invocation;
+
+import org.jboss.portal.common.invocation.Invocation;
+import org.jboss.portal.common.invocation.InvocationException;
+import org.jboss.portal.common.invocation.InvocationHandler;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PresentationInvocationHandler implements InvocationHandler
+{
+ /**
+ *
+ */
+ private ClientController clientController = null;
+
+ /**
+ *
+ * @param clientController
+ */
+ public PresentationInvocationHandler(ClientController clientController)
+ {
+ this.clientController = clientController;
+ }
+
+ /**
+ *
+ */
+ public Object invoke(Invocation invocation) throws Exception, InvocationException
+ {
+ this.clientController.handle((PresentationInvocation)invocation);
+
+ return null;
+ }
+}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.server;
-import org.jboss.portal.server.ServerException;
import org.jboss.portal.presentation.client.PresentationContext;
/**
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * 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.presentation.server;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8784 $
+ */
+public class ServerException extends Exception
+{
+ public ServerException()
+ {
+ }
+
+ public ServerException(String message)
+ {
+ super(message);
+ }
+
+ public ServerException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ServerException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Property changes on: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/presentation/trunk/presentation/src/main/resources/war/WEB-INF/web.xml
===================================================================
--- modules/presentation/trunk/presentation/src/main/resources/war/WEB-INF/web.xml (rev 0)
+++ modules/presentation/trunk/presentation/src/main/resources/war/WEB-INF/web.xml 2008-04-01 05:51:13 UTC (rev 10446)
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!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>
+ <!-- Add the GWT Client Filter to run the Portal in full Web 2.0 Ajax Mode. In turn, to run in Classic Html Mode, turn this filter off -->
+ <filter>
+ <filter-name>GWTClientFilter</filter-name>
+ <filter-class>org.jboss.portal.presentation.impl.ajax.entry.GWTClientFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>GWTClientFilter</filter-name>
+ <servlet-name>PortalServletWithPathMapping</servlet-name>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>GWTClientFilter</filter-name>
+ <servlet-name>PortalServletWithDefaultServletMapping</servlet-name>
+ </filter-mapping>
+
+ <!-- Asynchronous service request processor -->
+ <servlet>
+ <servlet-name>AjaxPortalEntryPoint</servlet-name>
+ <servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
+ <init-param>
+ <param-name>interceptorStackFactoryName</param-name>
+ <param-value>portal:service=InterceptorStackFactory,type=Server</param-value>
+ <description>The request controller factory for the portal servlet</description>
+ </init-param>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AjaxPortalEntryPoint</servlet-name>
+ <url-pattern>/portalrpc/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -19,17 +19,8 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.portal.common.invocation.InterceptorStackFactory;
-import org.jboss.portal.server.RequestControllerFactory;
-import org.jboss.portal.server.Server;
-import org.jboss.portal.server.ServerInvocationContext;
-import org.jboss.portal.server.impl.ServerInvocationContextImpl;
-import org.jboss.portal.server.request.URLContext;
-import org.jboss.portal.server.ServerRequest;
-import org.jboss.portal.server.ServerResponse;
-import org.jboss.portal.server.ServerInvocation;
-import org.jboss.portal.server.RequestController;
-import org.jboss.portal.server.RequestControllerDispatcher;
import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
@@ -37,6 +28,7 @@
import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
+import org.jboss.portal.presentation.invocation.PresentationInvocation;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
@@ -53,28 +45,16 @@
/** The logger. */
private Logger log = Logger.getLogger(getClass());
- /**
- *
- */
- private RequestControllerFactory controllerFactory = null;
-
/** Configure the as default servlet. */
public void init() throws ServletException
{
try
{
- MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
-
- //Locate the request controller
- this.controllerFactory = (RequestControllerFactory) MBeanProxy.get(RequestControllerFactory.class, new ObjectName(
- this.getInitParameter("controllerFactoryName")),
- mbeanServer);
-
+ MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
}
catch (Exception e)
{
- this.controllerFactory = null;
String msg = "Ajax Portal Entry point could not be created";
log.error(msg, e);
throw new UnavailableException(msg);
@@ -281,44 +261,16 @@
*
*/
private void callPortalServer() throws Exception
- {
+ {
HttpServletRequest req = this.getThreadLocalRequest();
HttpServletResponse resp = this.getThreadLocalResponse();
- String requestURI = req.getRequestURI();
- String contextPath = req.getContextPath();
- String portalHost = req.getServerName();
- String portalRequestPath = requestURI.substring(contextPath.length());
- String portalContextPath = requestURI.substring(0, contextPath.length());
- URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
-
+
WebRequest webReq = new WebRequest(req);
-
- //
- ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
- req,
- resp,
- webReq,
- portalHost,
- portalRequestPath,
- portalContextPath,
- urlContext
- );
+ WebResponse webResp = new WebResponse(resp);
+ PresentationInvocation invocation = new PresentationInvocation(webReq, webResp);
- //
- ServerRequest request = new ServerRequest(invocationCtx);
-
- //
- ServerResponse response = new ServerResponse(request, invocationCtx);
-
- //
- ServerInvocation invocation = new ServerInvocation(invocationCtx);
- invocation.setRequest(request);
- invocation.setResponse(response);
-
- //
- RequestController controller = this.controllerFactory.createRequestController(invocation);
- invocation.setHandler(new RequestControllerDispatcher(controller));
-
+ //TODO: set the proper invocation handler here
+
invocation.invokeNext();
}
}
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-01 05:27:23 UTC (rev 10445)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-01 05:51:13 UTC (rev 10446)
@@ -29,7 +29,7 @@
import org.jboss.portal.web.Body;
-import org.jboss.portal.server.ServerException;
+import org.jboss.portal.presentation.server.ServerException;
import org.jboss.portal.presentation.server.Processor;
import org.jboss.portal.presentation.server.ProcessorRequest;
16 years, 1 month
JBoss Portal SVN: r10445 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-01 01:27:23 -0400 (Tue, 01 Apr 2008)
New Revision: 10445
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
6.2.4. The portlet.xml Descriptor
- final revisions
- minor changes to wording in tutorials.xml
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-04-01 04:31:25 UTC (rev 10444)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-04-01 05:27:23 UTC (rev 10445)
@@ -316,7 +316,7 @@
</supports>]]></screen></term>
<listitem>
<para>
- The <computeroutput><supports></computeroutput> element declares all of the markup types that your portlet supports in the <literal>render</literal> method. This is accomplished via the
+ The <computeroutput><supports></computeroutput> element declares all of the markup types that a portlet supports in the <literal>render</literal> method. This is accomplished via the
<computeroutput><mime-type></computeroutput> element, which is required for every portlet. The declared MIME types must match the capability of the portlet. As well, it allows you to pair which modes and window states are supported for each markup type. All portlets must support the <computeroutput>view</computeroutput> portlet mode, so this does not have to be declared. Use the <computeroutput><mime-type></computeroutput> element to define which markup type your portlet supports, which in this example, is <computeroutput>text/html</computeroutput>. This section tells the portal that it only outputs text and HTML, and that it only supports the <computeroutput>view</computeroutput> mode.
</para>
</listitem>
@@ -1091,7 +1091,7 @@
</supports>]]></screen></term>
<listitem>
<para>
- The <computeroutput><supports></computeroutput> element allows you to declare all of the markup types that your portlet supports in the <literal>render</literal> method. This is accomplished via the
+ The <computeroutput><supports></computeroutput> element allows you to declare all of the markup types that a portlet supports in the <literal>render</literal> method. This is accomplished via the
<computeroutput><mime-type></computeroutput> element, which is required for every portlet. The declared MIME types must match the capability of the portlet. As well, it allows you to pair which modes and window states are supported for each markup type. All portlets must support the <computeroutput>view</computeroutput> portlet mode, so this does not have to be declared. Use the <computeroutput><mime-type></computeroutput> element to define which markup type your portlet supports, which in this example, is <computeroutput>text/html</computeroutput>. This section tells the portal that it only outputs text and HTML, and that it only supports the <computeroutput>view</computeroutput> mode.
</para>
</listitem>
@@ -1413,7 +1413,7 @@
</supports>]]></screen></term>
<listitem>
<para>
- The <computeroutput><supports></computeroutput> element allows you to declare all of the markup types that your portlet supports in the <literal>render</literal> method. This is accomplished via the
+ The <computeroutput><supports></computeroutput> element allows you to declare all of the markup types that a portlet supports in the <literal>render</literal> method. This is accomplished via the
<computeroutput><mime-type></computeroutput> element, which is required for every portlet. The declared MIME types must match the capability of the portlet. As well, it allows you to pair which modes and window states are supported for each markup type. All portlets must support the <computeroutput>view</computeroutput> portlet mode, so this does not have to be declared. Use the <computeroutput><mime-type></computeroutput> element to define which markup type your portlet supports, which in this example, is <computeroutput>text/html</computeroutput>. This section tells the portal that it only outputs text and HTML, and that it only supports the <computeroutput>view</computeroutput> mode.
</para>
</listitem>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 04:31:25 UTC (rev 10444)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 05:27:23 UTC (rev 10445)
@@ -1397,7 +1397,7 @@
<sect2>
<title>The <filename>portlet.xml</filename> Descriptor</title>
<para>
- The <filename>portlet.xml</filename> descriptor is the standard portlet descriptor covered by the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink>. Developers are strongly encouraged to read the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink> items covering the correct use of this descriptor, as it is only covered briefly in these sections. Normally, the <filename>portlet.xml</filename> descriptor is packaged inside your portlet WAR file, alongside the other descriptors in these sections. The following example is a modified version of the JBoss Portal UserPortlet definition:
+ The <filename>portlet.xml</filename> descriptor is the standard portlet descriptor covered by the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink>. Developers are strongly encouraged to read the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink> items covering the correct use of this descriptor, as it is only covered briefly in these sections. Normally the <filename>portlet.xml</filename> descriptor is packaged inside your portlet WAR file, alongside the other descriptors in these sections. The following example is a modified version of the JBoss Portal UserPortlet definition:
</para>
<para>
<screen><![CDATA[
@@ -1414,7 +1414,7 @@
<display-name>User Portlet</display-name>
<portlet-class>org.jboss.portal.core.portlet.user.UserPortlet</portlet-class>
<init-param>
- <description>Whether we should use ssl on login and throughout the Portal.
+ <description>Whether we should use SSL for log ins, and throughout the Portal.
1=yes;0=no</description>
<name>useSSL</name>
<value>0</value>
@@ -1493,7 +1493,7 @@
<programlisting><![CDATA[<supports>...</supports>]]></programlisting>
</para>
<para>
- The <computeroutput><supports></computeroutput> element declares all of the markup types that your portlet supports. Use the <computeroutput><mime-type></computeroutput> element to declare supported capabilities, for example, if the only outputs are text and HTML, use <computeroutput><mime-type>text/html</mime-type></computeroutput>. Use the <computeroutput><portlet-mode></computeroutput> element to define the supported portlet modes for the portlet. For example, all portlets must support <computeroutput>view</computeroutput> portlet mode, which is defined using <computeroutput><portlet-mode>view</portlet-mode></computeroutput>.
+ The <computeroutput><supports></computeroutput> element declares all of the markup types that a portlet supports. Use the <computeroutput><mime-type></computeroutput> element to declare supported capabilities, for example, if the only outputs are text and HTML, use <computeroutput><mime-type>text/html</mime-type></computeroutput>. Use the <computeroutput><portlet-mode></computeroutput> element to define the supported portlet modes for the portlet. For example, all portlets must support <computeroutput>view</computeroutput> portlet mode, which is defined using <computeroutput><portlet-mode>view</portlet-mode></computeroutput>.
</para>
</listitem>
<listitem>
@@ -1509,7 +1509,7 @@
<programlisting><![CDATA[<resource-bundle>...</resource-bundle>]]></programlisting>
</para>
<para>
- The <computeroutput><resource-bundle></computeroutput> element contains the localized information for the specified locales.
+ The <computeroutput><resource-bundle></computeroutput> element specifies the resource bundle that contains the localized information for the specified locales.
</para>
</listitem>
<listitem>
16 years, 1 month
JBoss Portal SVN: r10444 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-01 00:31:25 -0400 (Tue, 01 Apr 2008)
New Revision: 10444
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
6.2.4. The portlet.xml Descriptor
- revising content
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-04-01 03:10:40 UTC (rev 10443)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-04-01 04:31:25 UTC (rev 10444)
@@ -316,7 +316,7 @@
</supports>]]></screen></term>
<listitem>
<para>
- The <computeroutput><supports></computeroutput> element allows you to declare all of the markup types that your portlet supports in the <literal>render</literal> method. This is accomplished via the
+ The <computeroutput><supports></computeroutput> element declares all of the markup types that your portlet supports in the <literal>render</literal> method. This is accomplished via the
<computeroutput><mime-type></computeroutput> element, which is required for every portlet. The declared MIME types must match the capability of the portlet. As well, it allows you to pair which modes and window states are supported for each markup type. All portlets must support the <computeroutput>view</computeroutput> portlet mode, so this does not have to be declared. Use the <computeroutput><mime-type></computeroutput> element to define which markup type your portlet supports, which in this example, is <computeroutput>text/html</computeroutput>. This section tells the portal that it only outputs text and HTML, and that it only supports the <computeroutput>view</computeroutput> mode.
</para>
</listitem>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 03:10:40 UTC (rev 10443)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 04:31:25 UTC (rev 10444)
@@ -1161,7 +1161,10 @@
</listitem>
<listitem>
<para>
- <programlisting><![CDATA[<deployment><instance>...</instance></deployment>]]></programlisting>
+<programlisting><![CDATA[
+<deployment>
+ <instance>...</instance>
+</deployment>]]></programlisting>
</para>
<para>
The <computeroutput><deployment></computeroutput> element, and the embedded <computeroutput><instance></computeroutput> element, specify a portlet instance. The <computeroutput><deployment></computeroutput> element specifies object deployments, such as portals, pages, windows, and so on. The <computeroutput><instance></computeroutput> element is used to create instances of portlets. The portlet will only be created and configured if the portlet is present, and an instance with the same name does not already exist.
@@ -1185,7 +1188,10 @@
</listitem>
<listitem>
<para>
- <programlisting><![CDATA[<preferences><preference>...</preference></preferences>]]></programlisting>
+<programlisting><![CDATA[
+<preferences>
+ <preference>...</preference>
+</preferences>]]></programlisting>
</para>
<para>
The <computeroutput><preference></computeroutput> element configures a preference as a key-value pair. This value can be composed of a single string value, for example, the preference <emphasis>fruit</emphasis> can have the <emphasis>apple</emphasis> value. As well, this value can be composed of multiple strings, for example, the preference <emphasis>fruits</emphasis> can have values of <emphasis>apple</emphasis>, <emphasis>orange</emphasis>, and <emphasis>kiwi</emphasis>:
@@ -1472,40 +1478,60 @@
</listitem>
<listitem>
<para>
- <programlisting><![CDATA[<init-param><name>...</name><value>...</value></init-param>]]></programlisting>
+ <programlisting><![CDATA[
+<init-param>
+ <name>...</name>
+ <value>...</value>
+</init-param>]]></programlisting>
</para>
<para>
- Use the <computeroutput><init-param></computeroutput> element to specify initialization parameters to create an initial state inside your portlet class. This is used in the portlet's <emphasis>init()</emphasis> method. Multiple <computeroutput><init-param></computeroutput> elements can be used.
+ The <computeroutput><init-param></computeroutput> element specifies initialization parameters to create an initial state inside your portlet class. This is used in the portlet's <emphasis>init()</emphasis> method. Multiple <computeroutput><init-param></computeroutput> elements can be used.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<supports>...</supports>]]></programlisting>
- Here, you would advertise the supported <emphasis>mime-type</emphasis> and supported
- <emphasis>portlet-modes</emphasis> for this portlet.
+ </para>
+ <para>
+ The <computeroutput><supports></computeroutput> element declares all of the markup types that your portlet supports. Use the <computeroutput><mime-type></computeroutput> element to declare supported capabilities, for example, if the only outputs are text and HTML, use <computeroutput><mime-type>text/html</mime-type></computeroutput>. Use the <computeroutput><portlet-mode></computeroutput> element to define the supported portlet modes for the portlet. For example, all portlets must support <computeroutput>view</computeroutput> portlet mode, which is defined using <computeroutput><portlet-mode>view</portlet-mode></computeroutput>.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<supported-locale>...</supported-locale>]]></programlisting>
- Here, you would advertise the supported locales for this portlet. Several locales can be specified.
+ </para>
+ <para>
+ The <computeroutput><supported-locale></computeroutput> elements advertise the supported locales for the portlet. Use multiple <computeroutput><supported-locale></computeroutput> elements to specify multiple locales.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<resource-bundle>...</resource-bundle>]]></programlisting>
- The resource bundle that will containing the localized information for the specified locales.
+ </para>
+ <para>
+ The <computeroutput><resource-bundle></computeroutput> element contains the localized information for the specified locales.
</para>
</listitem>
<listitem>
<para>
- <programlisting><![CDATA[<portlet-info><title>...</title></portlet-info>]]></programlisting>
- The portlet title that will be displayed in the portlet window's title bar.
+ <programlisting><![CDATA[
+<portlet-info>
+ <title>...</title>
+</portlet-info>]]></programlisting>
</para>
+ <para>
+ The <computeroutput><title></computeroutput> element defines the portlet's title, which is displayed in the portlet window's title bar.
+ </para>
</listitem>
</itemizedlist>
- <note>This is a simple portlet.xml primer, and is not meant as a replacement for what is covered in the
- actual Portlet specification.</note>
+ </para>
+ <para>
+ <warning>
+ <title>The <filename>portlet.xml</filename> Example</title>
+ <para>
+ This <filename>portlet.xml</filename> example is not a replacement for what is covered in the JSR-168 Portlet Specification.
+ </para>
+ </warning>
</para>
</sect2>
</sect1>
16 years, 1 month
JBoss Portal SVN: r10443 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-03-31 23:10:40 -0400 (Mon, 31 Mar 2008)
New Revision: 10443
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
6.2.4. The portlet.xml Descriptor
backup/minor revisions
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 02:57:23 UTC (rev 10442)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 03:10:40 UTC (rev 10443)
@@ -1473,9 +1473,9 @@
<listitem>
<para>
<programlisting><![CDATA[<init-param><name>...</name><value>...</value></init-param>]]></programlisting>
- Using the <emphasis>init-param</emphasis> tag, you can specify initialization parameters to create
- initial state inside your portlet class. Normally, they would be used in the portlet's
- <emphasis>init()</emphasis> method. You can specify more than one init-param.
+ </para>
+ <para>
+ Use the <computeroutput><init-param></computeroutput> element to specify initialization parameters to create an initial state inside your portlet class. This is used in the portlet's <emphasis>init()</emphasis> method. Multiple <computeroutput><init-param></computeroutput> elements can be used.
</para>
</listitem>
<listitem>
16 years, 1 month
JBoss Portal SVN: r10442 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-03-31 22:57:23 -0400 (Mon, 31 Mar 2008)
New Revision: 10442
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
6.2.4. The portlet.xml Descriptor
- revising text
- periodic backup
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 00:57:20 UTC (rev 10441)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 02:57:23 UTC (rev 10442)
@@ -1391,10 +1391,10 @@
<sect2>
<title>The <filename>portlet.xml</filename> Descriptor</title>
<para>
- The <filename>portlet.xml</filename> descriptor is the standard portlet descriptor covered by the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink>. Developers are strongly encouraged to read the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink> items covering the correct use of this descriptor, as it is oinly covered briefly in this section. Normally, the <filename>portlet.xml</filename> descriptor is packaged inside your portlet WAR file, alongside other the other descriptors in these sections. The following example is a modified version of the JBoss Portal UserPortlet definition:
+ The <filename>portlet.xml</filename> descriptor is the standard portlet descriptor covered by the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink>. Developers are strongly encouraged to read the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink> items covering the correct use of this descriptor, as it is only covered briefly in these sections. Normally, the <filename>portlet.xml</filename> descriptor is packaged inside your portlet WAR file, alongside the other descriptors in these sections. The following example is a modified version of the JBoss Portal UserPortlet definition:
</para>
<para>
- <programlisting><![CDATA[
+<screen><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
@@ -1425,39 +1425,49 @@
<title>User portlet</title>
</portlet-info>
</portlet>
-</portlet-app>
-]]></programlisting>
+</portlet-app>]]>
+</screen>
+ </para>
+ <para>
<itemizedlist>
<listitem>
<para>
<programlisting><![CDATA[<portlet-app>...</portlet-app>]]></programlisting>
- The <emphasis>portlet-app</emphasis> tag, encapsulates the entire document. You may specify more
- than one portlet, within this tag.
+ </para>
+ <para>
+ The <computeroutput><portlet-app></computeroutput> element encapsulates the entire document. Multiple portlets can be specified using the <computeroutput><portlet-app></computeroutput> element.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet>...</portlet>]]></programlisting>
- The <emphasis>portlet</emphasis> tag is used to define one portlet that is deployed within
- this archive.
+ </para>
+ <para>
+ The <computeroutput><portlet></computeroutput> element defines one portlet that is deployed within this archive.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<description>...</description>]]></programlisting>
- A verbal description of this portlet's function.
+ </para>
+ <para>
+ The <computeroutput><description></computeroutput> element is a verbal description of the portlet's function.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet-name>...</portlet-name>]]></programlisting>
- The name of this portlet, usually the class name, though it doesn't have to be.
+ </para>
+ <para>
+ The <computeroutput><portlet-name></computeroutput> element defines the portlet name. It does not have to be the class name.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet-class>...</portlet-class>]]></programlisting>
- The fully-qualified name of this portlet class.
+ </para>
+ <para>
+ The <computeroutput><portlet-class></computeroutput> element defines the Fully Qualified Name (FQN) of the portlet class.
</para>
</listitem>
<listitem>
16 years, 1 month
JBoss Portal SVN: r10441 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-03-31 20:57:20 -0400 (Mon, 31 Mar 2008)
New Revision: 10441
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
6.2.3. The jboss-portlet.xml Descriptor
- final revisions
6.2.4. The portlet.xml Descriptor
- started revising first paragraph
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 00:20:32 UTC (rev 10440)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-04-01 00:57:20 UTC (rev 10441)
@@ -1286,12 +1286,12 @@
<sect2>
<title>The <filename>jboss-portlet.xml</filename> Descriptor</title>
<para>
- The <filename>jboss-portlet.xml</filename> descriptor allows you to use JBoss-specific functionality within your portlet application. This descriptor is covered by the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink>, and would normally be package inside your portlet WAR, alongside the other descriptors in these sections.
+ The <filename>jboss-portlet.xml</filename> descriptor allows you to use JBoss-specific functionality within your portlet application. This descriptor is covered by the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink>, and is normally packaged inside your portlet WAR file, alongside the other descriptors in these sections.
</para>
<sect3>
<title>Injecting Header Content</title>
<para>
- The following example injects a specific style sheet, <computeroutput>/images/management/management.css</computeroutput>, allowing the porlet to leverage a specific style:
+ The following example injects a specific style sheet, <computeroutput>/images/management/management.css</computeroutput>, allowing the portlet to leverage a specific style:
</para>
<para>
<screen><![CDATA[
@@ -1311,7 +1311,7 @@
</screen>
</para>
<para>
- Use the <computeroutput><header-content></computeroutput> and <computeroutput><link></computeroutput> elements to specify a style sheet to use.
+ Use the <computeroutput><header-content></computeroutput> and <computeroutput><link></computeroutput> elements to specify a style sheet.
</para>
</sect3>
<sect3>
@@ -1341,15 +1341,14 @@
<screen><![CDATA[
UserModule userModule = (UserModule) getPortletContext().getAttribute("UserModule");
String userId = request.getParameters().getParameter("userid");
-User user = userModule.findUserById(userId);
-]]>
+User user = userModule.findUserById(userId);]]>
</screen>
</para>
</sect3>
<sect3>
<title>Defining Extra Portlet Information</title>
<para>
- As of JBoss Portal 2.6.3, icons can be defined for a portlet, by using the <computeroutput><icon></computeroutput>, <computeroutput><small-icon></computeroutput>, and <computeroutput><large-icon></computeroutput> elements:
+ As of JBoss Portal 2.6.3, icons can be defined for a portlet by using the <computeroutput><icon></computeroutput>, <computeroutput><small-icon></computeroutput>, and <computeroutput><large-icon></computeroutput> elements:
</para>
<para>
<screen><![CDATA[
@@ -1371,20 +1370,30 @@
</screen>
</para>
<para>
- The reference can be absolute, for example, <emphasis>http://www.example.com/images/smallIcon.png</emphasis>, or relative to the web application context, by starting with a <computeroutput>/</computeroutput>, as shown above. These icons can be used by different parts of the portlet user interface.
+ References to icons can be absolute, for example, <emphasis>http://www.example.com/images/smallIcon.png</emphasis>, or relative to the web application context, for example, <computeroutput>/images/smallIcon.png</computeroutput>. Icons can be used by different parts of the portlet user interface.
</para>
</sect3>
<sect3>
<title>Portlet Session Replication in a Clustered Environment</title>
</sect3>
- <para>See <xref linkend="portlet_session_replication"/>.</para>
+ <para>
+ For information about portlet session replication in clustered environments, refer to <xref linkend="portlet_session_replication"/>.
+ </para>
+ <para>
+ <note>
+ <title>Is the <filename>jboss-portlet.xml</filename> descriptor required?</title>
+ <para>
+ Technically, it is not; however, it may be required to access JBoss-specific functionality that is not covered by the Portlet specification.
+ </para>
+ </note>
+ </para>
</sect2>
<sect2>
- <title>portlet.xml</title>
- <para>This is the standard portlet descriptor covered by the JSR-168 Specification. It is
- advisable that developers read the specification items covering proper use of this descriptor, as it is only
- covered here briefly. For example purposes, we use an edited version of our JBoss Portal UserPortlet
- definition. Normally, you would package this descriptor in your portlet WAR file.
+ <title>The <filename>portlet.xml</filename> Descriptor</title>
+ <para>
+ The <filename>portlet.xml</filename> descriptor is the standard portlet descriptor covered by the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink>. Developers are strongly encouraged to read the <ulink url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification</ulink> items covering the correct use of this descriptor, as it is oinly covered briefly in this section. Normally, the <filename>portlet.xml</filename> descriptor is packaged inside your portlet WAR file, alongside other the other descriptors in these sections. The following example is a modified version of the JBoss Portal UserPortlet definition:
+ </para>
+ <para>
<programlisting><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
@@ -1488,14 +1497,6 @@
<note>This is a simple portlet.xml primer, and is not meant as a replacement for what is covered in the
actual Portlet specification.</note>
</para>
- <para>
- <note>
- <title>Is the <filename>jboss-portlet.xml</filename> descriptor required?</title>
- <para>
- Technically, it is not; however, it may be required to access JBoss-specific functionality that is not covered by the Portlet specification.
- </para>
- </note>
- </para>
</sect2>
</sect1>
<sect1 id="portaldescriptors">
16 years, 1 month
JBoss Portal SVN: r10440 - in branches/JBoss_Portal_2_6_4_JBPB: core-admin/src/resources/portal-admin-war/jsf and 2 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-03-31 20:20:32 -0400 (Mon, 31 Mar 2008)
New Revision: 10440
Modified:
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
Log:
admin migration to portlet bridge - final fixes
Modified: branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-03-31 23:48:01 UTC (rev 10439)
+++ branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-01 00:20:32 UTC (rev 10440)
@@ -29,6 +29,15 @@
var domTT_maxWidth = false;
//]]>
+ function submitForm(elem,actionUrl){
+ while (elem.parentNode && elem.parentNode.tagName.toLowerCase() != "form"){
+ elem = elem.parentNode;
+ }
+ var oForm = elem.parentNode;
+ oForm.action = actionUrl;
+ oForm.submit();
+ }
+
</script>
<table style="width:500px;">
@@ -108,17 +117,11 @@
String iconLocation = getIcon(info);
- PortletURL actionURL = renderResponse.createActionURL();
- actionURL.setParameter("content.uri",instance.getId());
- actionURL.setParameter("content.action.select","true");
- String test = "?action=1&" + actionURL.toString().substring(actionURL.toString().lastIndexOf("?") + 1,actionURL.toString().length());
-// test = test.replace("/","%2F");
-//
%>
- <%--<portlet:actionURL var="test">--%>
- <%--<portlet:param name="content.action.select" value="true"/>--%>
- <%--<portlet:param name="content.uri" value="<%= instance.getId() %>"/>--%>
- <%--</portlet:actionURL>--%>
+ <portlet:actionURL var="test">
+ <portlet:param name="content.action.select" value="true"/>
+ <portlet:param name="content.uri" value="<%= instance.getId() %>"/>
+ </portlet:actionURL>
<div style="display:none">
<div class="darktip" id="info-container-<%= displayName %>">
@@ -141,7 +144,7 @@
<tr class="<%= rowClass %>" >
<td >
<img src="<%= iconLocation %>" align="middle" style="margin:0 4px 0 0"/>
- <span onmouseover="domTT_activate(this, event, 'content', document.getElementById('info-container-<%= displayName %>'),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a href="<%= test %>" id="portlet-instance-link"><%= displayName %></a></span>
+ <span onmouseover="domTT_activate(this, event, 'content', document.getElementById('info-container-<%= displayName %>'),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a href="javascript:void(0);" onclick="submitForm(this,'<%= test %>');return false" id="portlet-instance-link"><%= displayName %></a></span>
</td>
</tr>
<%
Modified: branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-03-31 23:48:01 UTC (rev 10439)
+++ branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-04-01 00:20:32 UTC (rev 10440)
@@ -63,6 +63,7 @@
</tr>
<tr>
<td colspan="2" valign="top">
+ <h:form>
<jbp:portlet
portletId="#{pageManager.selectedEditorPortletId}"
portletInvoker="#{pageManager.portletInvoker}"
@@ -73,6 +74,7 @@
initialWindowState="normal"
renderParameters="#{pageManager.selectedRenderParameters}"
onClick="url.setParameter('windowName', document.getElementById('windowForm:windowName').value);"/>
+ </h:form>
</td>
</tr>
</table>
Modified: branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-03-31 23:48:01 UTC (rev 10439)
+++ branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-04-01 00:20:32 UTC (rev 10440)
@@ -10,7 +10,7 @@
<ui:define name="content">
<!-- -->
-
+ <h:form>
<div class="clear">
<jbp:portlet
actionListener="#{portalobjectmgr.processEvent}"
@@ -22,7 +22,7 @@
initialMode="edit_content"
initialWindowState="normal"/>
</div>
-
+ </h:form>
</ui:define>
</ui:composition>
Modified: branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-03-31 23:48:01 UTC (rev 10439)
+++ branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-01 00:20:32 UTC (rev 10440)
@@ -112,8 +112,10 @@
ViewHandler vh = faces.getApplication().getViewHandler();
String viewId = faces.getViewRoot().getViewId();
String clientId = uiportlet.getClientId(faces);
- StringBuffer url = new StringBuffer(vh.getActionURL(faces, viewId));
+ String actionURL = vh.getActionURL(faces, viewId);
+ actionURL = faces.getExternalContext().encodeActionURL(actionURL);
+ StringBuffer url = new StringBuffer(actionURL);
//
url.append("&").append(clientId).append("=jbp");
16 years, 1 month