Thread: [Jsf4portlets-devel] SF.net SVN: jsf4portlets: [14] trunk
Status: Alpha
Brought to you by:
alonsoft
From: <alo...@us...> - 2007-06-04 20:36:25
|
Revision: 14 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=14&view=rev Author: alonsoft Date: 2007-06-04 13:36:23 -0700 (Mon, 04 Jun 2007) Log Message: ----------- Fixed JSR-301 bugs and started development of 1.0-alpha-2 version. Modified Paths: -------------- trunk/pom.xml trunk/src/main/java/javax/portlet/faces/GenericFacesPortlet.java trunk/src/main/java/net/sf/jsf4portlets/BridgeImpl.java trunk/src/main/java/net/sf/jsf4portlets/context/AbstractAttributeMap.java trunk/src/main/java/net/sf/jsf4portlets/context/ApplicationMap.java trunk/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java trunk/src/main/java/net/sf/jsf4portlets/context/RequestMap.java trunk/src/main/java/net/sf/jsf4portlets/context/SessionMap.java Added Paths: ----------- trunk/src/main/java/net/sf/jsf4portlets/context/PreDestroyCallback.java trunk/src/site/apt/ trunk/src/site/apt/download.apt trunk/src/site/apt/release_notes.apt trunk/src/site/apt/user_docs.apt Removed Paths: ------------- trunk/src/site/xdoc/download.xml trunk/src/site/xdoc/release_notes.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/pom.xml 2007-06-04 20:36:23 UTC (rev 14) @@ -11,9 +11,9 @@ <url>http://jsf4portlets.sf.net/</url> <scm> - <connection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/tags/jsf4portlets-1.0-alpha-1</connection> - <developerConnection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/tags/jsf4portlets-1.0-alpha-1</developerConnection> - <url>http://jsf4portlets.svn.sourceforge.net/viewvc/jsf4portlets/tags/jsf4portlets-1.0-alpha-1</url> + <connection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/trunk</connection> + <developerConnection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/trunk</developerConnection> + <url>http://jsf4portlets.svn.sourceforge.net/viewvc/jsf4portlets/trunk</url> </scm> <description> @@ -158,6 +158,10 @@ <groupId>net.sourceforge.maven-taglib</groupId> <artifactId>maven-taglib-plugin</artifactId> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changelog-plugin</artifactId> + </plugin> </plugins> </reporting> Modified: trunk/src/main/java/javax/portlet/faces/GenericFacesPortlet.java =================================================================== --- trunk/src/main/java/javax/portlet/faces/GenericFacesPortlet.java 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/main/java/javax/portlet/faces/GenericFacesPortlet.java 2007-06-04 20:36:23 UTC (rev 14) @@ -126,10 +126,19 @@ return portletConfig.getResourceBundle(locale); } + protected Bridge getBridge() { + return bridge; + } + private void storeViewIdParameter(PortletRequest request) throws PortletException { PortletMode portletMode = request.getPortletMode(); + // Check whether the requested mode is allowed + if(!request.isPortletModeAllowed(portletMode)) { + throw new PortletException(portletMode + " is not allowed"); + } + String viewId = null; // Get the view identifier based on the mode. if(PortletMode.VIEW.equals(portletMode)) { @@ -140,9 +149,13 @@ viewId = getPortletConfig().getInitParameter(INIT_HELP); } - // Check whether the requested mode is allowed - if(!request.isPortletModeAllowed(portletMode) || viewId == null) { - throw new PortletException(portletMode + " is not allowed"); + if(viewId == null) { + if(PortletMode.VIEW.equals(portletMode)) { + throw new PortletException("Portlet '" + getPortletName() + "' misses a default view page. " + + "Please take a look to http://jsf4portlets.sf.net/web/user_docs.html"); + } + throw new PortletException("Portlet '" + getPortletName() + + "' misses a default viewId for portlet mode: " + portletMode); } request.setAttribute("javax.portlet.faces.defaultViewId", viewId); Modified: trunk/src/main/java/net/sf/jsf4portlets/BridgeImpl.java =================================================================== --- trunk/src/main/java/net/sf/jsf4portlets/BridgeImpl.java 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/main/java/net/sf/jsf4portlets/BridgeImpl.java 2007-06-04 20:36:23 UTC (rev 14) @@ -245,7 +245,7 @@ // Protected methods - protected final RequestScope getPreviousRequestScope( + protected RequestScope getPreviousRequestScope( PortletRequest request) { PortletSession session = request.getPortletSession(true); String requestScopeId = getRequestScopeIdentifier(request); Modified: trunk/src/main/java/net/sf/jsf4portlets/context/AbstractAttributeMap.java =================================================================== --- trunk/src/main/java/net/sf/jsf4portlets/context/AbstractAttributeMap.java 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/main/java/net/sf/jsf4portlets/context/AbstractAttributeMap.java 2007-06-04 20:36:23 UTC (rev 14) @@ -36,13 +36,13 @@ private Set<Entry<String, T>> entries = new AttributeEntrySet(); private Collection<T> values = new ValueSet(); - private ExternalContextImpl.Callback callback; + private PreDestroyCallback callback; protected AbstractAttributeMap() { this(null); } - protected AbstractAttributeMap(ExternalContextImpl.Callback callback) { + protected AbstractAttributeMap(PreDestroyCallback callback) { this.callback = callback; } @@ -55,7 +55,7 @@ for(String key : names) { T value = getAttribute(key); removeAttribute(key); - if(callback != null) { + if(callback != null && value != null) { callback.attributeRemoved(key, value); } } @@ -143,7 +143,7 @@ protected abstract void removeAttribute(String key); - protected final ExternalContextImpl.Callback getCallback() { + protected final PreDestroyCallback getCallback() { return callback; } Modified: trunk/src/main/java/net/sf/jsf4portlets/context/ApplicationMap.java =================================================================== --- trunk/src/main/java/net/sf/jsf4portlets/context/ApplicationMap.java 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/main/java/net/sf/jsf4portlets/context/ApplicationMap.java 2007-06-04 20:36:23 UTC (rev 14) @@ -27,8 +27,10 @@ class ApplicationMap extends AbstractAttributeMap<Object> { private PortletContext portletContext; - protected ApplicationMap(PortletContext portletContext) { - assert portletContext != null; + protected ApplicationMap(PortletContext portletContext, + PreDestroyCallback callback) { + super(callback); + assert (portletContext != null && callback != null); this.portletContext = portletContext; } Modified: trunk/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java =================================================================== --- trunk/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2007-06-04 20:36:23 UTC (rev 14) @@ -64,17 +64,12 @@ * a portlet environment.</p> */ -public class ExternalContextImpl extends ExternalContext { +public class ExternalContextImpl extends ExternalContext +implements PreDestroyCallback { private final Logger logger = Logger.getLogger( ExternalContextImpl.class.getPackage().getName(), "net.sf.jsf4portlets.LogMessages"); - // ---------------------------------------------------- Protected Interfaces - - protected static interface Callback { - public void attributeRemoved(String name, Object value); - } - // ------------------------------------------------------------ Constructors @@ -122,8 +117,6 @@ private Map<String, String[]> requestParameterValuesMap = null; private Map<String, Object> sessionMap = null; - private Callback callback = null; - // ---------------------------------------------------------- Public Methods @@ -245,7 +238,7 @@ @Override public Map<String, Object> getApplicationMap() { if (applicationMap == null) { - applicationMap = new ApplicationMap(context); + applicationMap = new ApplicationMap(context, this); } return (applicationMap); } @@ -346,7 +339,7 @@ @Override public Map<String, Object> getRequestMap() { if (requestMap == null) { - requestMap = new RequestMap(request, getCallback()); + requestMap = new RequestMap(request, this); } return (requestMap); } @@ -364,12 +357,14 @@ if(requestScope != null) { logger.log(Level.FINER, "J4P_000019"); requestParameterMap = new RenderRequestParameterMap(requestScope); - } else { - requestParameterMap = Collections.<String, String>emptyMap(); } - } else { - throw new IllegalStateException(); } + + // Don't throw an IllegalStateException, return an empty map. + // Throwing an exception provokes that the portlet becomes unavailable. + if(requestParameterMap == null) { + requestParameterMap = Collections.<String, String>emptyMap(); + } } } return requestParameterMap; @@ -393,12 +388,14 @@ if(requestScope != null) { logger.log(Level.FINER, "J4P_000019"); requestParameterValuesMap = new RenderRequestParameterValuesMap(requestScope); - } else { - requestParameterValuesMap = Collections.<String, String[]>emptyMap(); } - } else { - throw new IllegalStateException(); } + + // Don't throw an IllegalStateException, return an empty map. + // Throwing an exception provokes that the portlet becomes unavailable. + if(requestParameterValuesMap == null) { + requestParameterValuesMap = Collections.<String, String[]>emptyMap(); + } } } return requestParameterValuesMap; @@ -477,7 +474,7 @@ @Override public Map<String, Object> getSessionMap() { if (sessionMap == null) { - sessionMap = new SessionMap(request, getCallback()); + sessionMap = new SessionMap(request, this); } return (sessionMap); } @@ -554,7 +551,7 @@ } PathString qs = PathString.parse(getRequestContextPath(), path); - if(path.startsWith("#") || path.startsWith(getRequestContextPath()) + if(path.startsWith("#") || !path.startsWith(getRequestContextPath()) || !"true".equals(qs.getParameter(BridgeConstants.DIRECT_LINK))) { if (logger.isLoggable(Level.FINEST)) { logger.log(Level.FINER, "J4P_000024", path); @@ -563,33 +560,24 @@ } logger.exiting(ExternalContextImpl.class.getName(), "redirect"); } - - private Callback getCallback() { - if(callback == null) { - callback = new CallbackImpl(); - } - return callback; - } - private class CallbackImpl implements Callback { - - public void attributeRemoved(String name, Object value) { - PortletConfiguration config = PortletConfiguration - .getInstance(ExternalContextImpl.this); - if(config.getManagedBean(name) != null) { - InjectionProvider ip = InjectionProviderFactory - .createInstance(ExternalContextImpl.this); - try { - ip.invokePreDestroy(value); - } catch(InjectionProviderException e) { - LogRecord logRecord = new LogRecord(Level.INFO, "J4P_000033"); - logRecord.setParameters(new Object[]{ name }); - logRecord.setThrown(e); - logger.log(logRecord); - } + // PreDestroyCallback + + public void attributeRemoved(String name, Object value) { + PortletConfiguration config = PortletConfiguration + .getInstance(ExternalContextImpl.this); + if(config.getManagedBean(name) != null) { + InjectionProvider ip = InjectionProviderFactory + .createInstance(this); + try { + ip.invokePreDestroy(value); + } catch(InjectionProviderException e) { + LogRecord logRecord = new LogRecord(Level.INFO, "J4P_000033"); + logRecord.setParameters(new Object[]{ name }); + logRecord.setThrown(e); + logger.log(logRecord); } } - } } Added: trunk/src/main/java/net/sf/jsf4portlets/context/PreDestroyCallback.java =================================================================== --- trunk/src/main/java/net/sf/jsf4portlets/context/PreDestroyCallback.java (rev 0) +++ trunk/src/main/java/net/sf/jsf4portlets/context/PreDestroyCallback.java 2007-06-04 20:36:23 UTC (rev 14) @@ -0,0 +1,7 @@ +package net.sf.jsf4portlets.context; + +interface PreDestroyCallback { + + public void attributeRemoved(String name, Object value); + +} Modified: trunk/src/main/java/net/sf/jsf4portlets/context/RequestMap.java =================================================================== --- trunk/src/main/java/net/sf/jsf4portlets/context/RequestMap.java 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/main/java/net/sf/jsf4portlets/context/RequestMap.java 2007-06-04 20:36:23 UTC (rev 14) @@ -28,9 +28,9 @@ private PortletRequest portletRequest; protected RequestMap(PortletRequest portletRequest, - ExternalContextImpl.Callback callback) { + PreDestroyCallback callback) { super(callback); - assert portletRequest != null; + assert (portletRequest != null && callback != null); this.portletRequest = portletRequest; } Modified: trunk/src/main/java/net/sf/jsf4portlets/context/SessionMap.java =================================================================== --- trunk/src/main/java/net/sf/jsf4portlets/context/SessionMap.java 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/main/java/net/sf/jsf4portlets/context/SessionMap.java 2007-06-04 20:36:23 UTC (rev 14) @@ -34,16 +34,14 @@ private int scope; protected SessionMap(PortletRequest portletRequest, - ExternalContextImpl.Callback callback) { + PreDestroyCallback callback) { this(portletRequest, PortletSession.PORTLET_SCOPE, callback); } protected SessionMap(PortletRequest portletRequest, int scope, - ExternalContextImpl.Callback callback) { + PreDestroyCallback callback) { super(callback); - if(portletRequest == null) { - throw new NullPointerException(); - } + assert (portletRequest != null && callback != null); this.portletRequest = portletRequest; this.scope = scope; } Added: trunk/src/site/apt/download.apt =================================================================== --- trunk/src/site/apt/download.apt (rev 0) +++ trunk/src/site/apt/download.apt 2007-06-04 20:36:23 UTC (rev 14) @@ -0,0 +1,31 @@ + --- + Download JSF 4 Portlets + --- + A. Alonso Domínguez + --- + +Download JSF 4 Portlets + + Downloads for JSF 4 Portlets are served by {{{http://www.sourceforge.net}SourceForge.net}}, you can access the global project downloads through the following link {{http://sourceforge.net/project/showfiles.php?group_id=196120}}. + +* Current Release : 1.0-alpha-1 + +** Binary Distributions + +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Windows (*.zip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-bin.zip?modtime=1180909157&big_mirror=0}jsf4portlets-1.0-alpha-1-bin.zip}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (gzip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-bin.tar.gz?modtime=1180909046&big_mirror=0}jsf4portlets-1.0-alpha-1-bin.tar.gz}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (bzip2) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-bin.tar.bz2?modtime=1180909014&big_mirror=0}jsf4portlets-1.0-alpha-1-bin.tar.bz2}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +** Source Distributions + +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Windows (*.zip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-src.zip?modtime=1180909373&big_mirror=0}jsf4portlets-1.0-alpha-1-src.zip}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (gzip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-src.tar.gz?modtime=1180909345&big_mirror=0}jsf4portlets-1.0-alpha-1-src.tar.gz}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (bzip2) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-src.tar.bz2?modtime=1180909325&big_mirror=0}jsf4portlets-1.0-alpha-1-src.tar.bz2}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ Added: trunk/src/site/apt/release_notes.apt =================================================================== --- trunk/src/site/apt/release_notes.apt (rev 0) +++ trunk/src/site/apt/release_notes.apt 2007-06-04 20:36:23 UTC (rev 14) @@ -0,0 +1 @@ +JSF 4 Portlets - Release Notes Added: trunk/src/site/apt/user_docs.apt =================================================================== --- trunk/src/site/apt/user_docs.apt (rev 0) +++ trunk/src/site/apt/user_docs.apt 2007-06-04 20:36:23 UTC (rev 14) @@ -0,0 +1,130 @@ + --- + Using JSF 4 Portlets + --- + A. Alonso Dominguez + + +Using JSF 4 Portlets + + Before reading this document you should take a look to the {{{getting_started.html}Getting Started Guide}}. + +* Basic Configuration + + Because a JSF Portlet Application is a normal JSF Web Application we need to configure the Faces Servlet and the state saving method: + +** Faces Servlet + ++--- +<web-app ...> + + <context-param> + <param-name>javax.faces.STATE_SAVING_METHOD</param-name> + <param-name>server</param-name> + </context-param> + + <servlet> + <servlet-name>FacesServlet</servlet-name> + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> + + <load-on-startup>0</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>FacesServlet</servlet-name> + <url-pattern>*.jsf</url-pattern> + </servlet-mapping> + +</web-app> ++--- + +** Default Bridge Implementation + + Configure the default bridge that will be used if a given portlet is not specified with another diferent implementation in the file <<<WEB-INF/web.xml>>>: + ++--- +<context-param> + <param-name>javax.portlet.faces.extension.bridgeClass</param-name> + <param-value>net.sf.jsf4portlets.BridgeImpl</param-value> +</context-param> ++--- + +** Basic Portlet Configuration + + So, the last work is to configure the <<<javax.portlet.faces.GenericFacesPortlet>>>. This portlet will delegate all work to the bridge implementation. This portlet needs at least one init parameter so it can know the default <<<viewId>>> to be rendered when no <<<viewId>>> has been requested. Following there is an example: + ++--- +<portlet-app ...> + + <portlet> + <portlet-name>MyFacesPortlet</portlet-name> + <portlet-class> + javax.portlet.faces.GenericFacesPortlet + </portlet-class> + + <init-param> + <name>javax.portlet.faces.extension.INIT_VIEW</name> + <value>/welcome.jsf</value> + </init-param> + + ... + </portlet> + +</portlet-app> ++--- + +* Advanced Configuration + +** Bridge Parameters + + JSF portlets have the ability to preserve its action parameters during the render phase and to perform redirects againts the portal. This two features are disabled by default so they must be configured so portlets can take advantage of them. + If you want to configure this two features to every portlet in the same web application you must set the following in your <<<WEB-INF/web.xml>>> file. You can also specify these parameters in the <<<WEB-INF/portlet.xml>>> file as portlet init parameters. + +*** Performing redirects againts the portal page: + ++--- +<context-param> + <param-name>javax.portlet.faces.ENCODE_REDIRECT_URL</param-name> + <param-value>true</param-value> +</context-param> ++--- + +*** Preserving action parameters + ++--- +<context-param> + <param-name>javax.portlet.faces.PRESERVE_ACTION_PARAMS</param-name> + <param-value>true</param-value> +</context-param> ++--- + +** Portlet Modes + + JSF 4 Porlets supports portlets with 3 different portlet modes: <<<VIEW>>>, <<<EDIT>>> and <<<HELP>>>, in the future custom portlet modes will also be supported. Every portlet needs to configure the <<<VIEW>>> mode as the default, <<<EDIT>>> and <<<HELP>>> modes are optional. + Each portlet mode has a corresponding portlet init parameter so portlet can stablish the default viewId for the current portlet mode: + +*** View + ++--- +<init-param> + <name>javax.portlet.faces.extension.INIT_VIEW</name> + <value>/view.jsf</value> +</init-param> ++--- + +*** Edit + ++--- +<init-param> + <name>javax.portlet.faces.extension.INIT_EDIT</name> + <value>/edit.jsf</value> +</init-param> ++--- + +*** Help + ++--- +<init-param> + <name>javax.portlet.faces.extension.INIT_HELP</name> + <value>/help.jsf</value> +</init-param> ++--- Deleted: trunk/src/site/xdoc/download.xml =================================================================== --- trunk/src/site/xdoc/download.xml 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/site/xdoc/download.xml 2007-06-04 20:36:23 UTC (rev 14) @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - Copyright (C) 2007 A. Alonso Dominguez - - This library 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 library 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 library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - A. Alonso Dominguez - alo...@us... ---> - -<document> - <properties> - <autor email="alo...@us...">A. Alonso Dominguez</autor> - <title>Download JSF 4 Portlets</title> - </properties> - <body> - <section name="Binaries"> - <p>Sorry, there are no releases yet.</p> - </section> - </body> -</document> \ No newline at end of file Deleted: trunk/src/site/xdoc/release_notes.xml =================================================================== --- trunk/src/site/xdoc/release_notes.xml 2007-06-03 19:32:14 UTC (rev 13) +++ trunk/src/site/xdoc/release_notes.xml 2007-06-04 20:36:23 UTC (rev 14) @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - Copyright (C) 2007 A. Alonso Dominguez - - This library 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 library 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 library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - A. Alonso Dominguez - alo...@us... ---> - -<document> - <properties> - <author email="alo...@us...">A. Alonso Dominguez</author> - <title>JSF 4 Portlets - Release Notes</title> - </properties> - <body> - </body> -</document> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-08-23 17:11:48
|
Revision: 24 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=24&view=rev Author: alonsoft Date: 2007-08-23 10:11:29 -0700 (Thu, 23 Aug 2007) Log Message: ----------- Redistribution of project components Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/jsf4portlets-core/ trunk/jsf4portlets-core/pom.xml trunk/jsf4portlets-core/src/ trunk/jsf4portlets-core/src/assembly/ trunk/jsf4portlets-core/src/legal/ trunk/jsf4portlets-core/src/main/ trunk/jsf4portlets-core/src/site/ trunk/jsf4portlets-core/src/test/ trunk/jsf4portlets-ext/ trunk/jsf4portlets-ext/pom.xml Removed Paths: ------------- trunk/jsf4portlets-core/src/assembly/ trunk/jsf4portlets-core/src/legal/ trunk/jsf4portlets-core/src/main/ trunk/jsf4portlets-core/src/site/ trunk/jsf4portlets-core/src/test/ trunk/src/ Copied: trunk/jsf4portlets-core/pom.xml (from rev 21, trunk/pom.xml) =================================================================== --- trunk/jsf4portlets-core/pom.xml (rev 0) +++ trunk/jsf4portlets-core/pom.xml 2007-08-23 17:11:29 UTC (rev 24) @@ -0,0 +1,97 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets-project</artifactId> + <version>1.0-alpha-2-SNAPSHOT</version> + </parent> + + <artifactId>jsf4portlets-core</artifactId> + <packaging>jar</packaging> + + <name>JSF 4 Portlets Core</name> + + <dependencies> + <dependency> + <groupId>javax.el</groupId> + <artifactId>el-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>jsr250-api</artifactId> + </dependency> + <dependency> + <groupId>javax.portlet</groupId> + <artifactId>portlet-api</artifactId> + </dependency> + + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + </dependencies> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changelog-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <build> + <finalName>jsf4portlets</finalName> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/assembly/bin.xml</descriptor> + <descriptor>src/assembly/src.xml</descriptor> + </descriptors> + </configuration> + </plugin> + </plugins> + </build> + +</project> Copied: trunk/jsf4portlets-core/src (from rev 21, trunk/src) Copied: trunk/jsf4portlets-core/src/assembly (from rev 23, trunk/src/assembly) Copied: trunk/jsf4portlets-core/src/legal (from rev 23, trunk/src/legal) Copied: trunk/jsf4portlets-core/src/main (from rev 23, trunk/src/main) Copied: trunk/jsf4portlets-core/src/site (from rev 23, trunk/src/site) Copied: trunk/jsf4portlets-core/src/test (from rev 23, trunk/src/test) Added: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml (rev 0) +++ trunk/jsf4portlets-ext/pom.xml 2007-08-23 17:11:29 UTC (rev 24) @@ -0,0 +1,96 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets-project</artifactId> + <version>1.0-alpha-2-SNAPSHOT</version> + </parent> + + <artifactId>jsf4portlets-ext</artifactId> + <packaging>jar</packaging> + + <name>JSF 4 Portlets Extensions</name> + + <dependencies> + <dependency> + <groupId>javax.el</groupId> + <artifactId>el-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>jsr250-api</artifactId> + </dependency> + <dependency> + <groupId>javax.portlet</groupId> + <artifactId>portlet-api</artifactId> + </dependency> + + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + </dependencies> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changelog-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/assembly/bin.xml</descriptor> + <descriptor>src/assembly/src.xml</descriptor> + </descriptors> + </configuration> + </plugin> + </plugins> + </build> + +</project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-08-21 15:07:12 UTC (rev 23) +++ trunk/pom.xml 2007-08-23 17:11:29 UTC (rev 24) @@ -2,10 +2,10 @@ <modelVersion>4.0.0</modelVersion> <groupId>net.sf.jsf4portlets</groupId> - <artifactId>jsf4portlets</artifactId> + <artifactId>jsf4portlets-project</artifactId> <version>1.0-alpha-2-SNAPSHOT</version> - <packaging>jar</packaging> + <packaging>pom</packaging> <name>JSF 4 Portlets</name> <url>http://jsf4portlets.sf.net/</url> @@ -73,6 +73,56 @@ </snapshotRepository> </distributionManagement> + <modules> + <module>jsf4portlets-core</module> + <module>jsf4portlets-ext</module> + </modules> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/assembly/bin.xml</descriptor> + <descriptor>src/assembly/src.xml</descriptor> + </descriptors> + </configuration> + </plugin> + </plugins> + </build> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changelog-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <dependencyManagement> <dependencies> <dependency> <groupId>javax.el</groupId> @@ -143,49 +193,6 @@ <scope>test</scope> </dependency> </dependencies> + </dependencyManagement> - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-project-info-reports-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - </plugin> - <plugin> - <groupId>net.sourceforge.maven-taglib</groupId> - <artifactId>maven-taglib-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-changelog-plugin</artifactId> - </plugin> - </plugins> - </reporting> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <descriptors> - <descriptor>src/assembly/bin.xml</descriptor> - <descriptor>src/assembly/src.xml</descriptor> - </descriptors> - </configuration> - </plugin> - </plugins> - </build> - </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-08-23 17:18:03
|
Revision: 25 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=25&view=rev Author: alonsoft Date: 2007-08-23 10:18:01 -0700 (Thu, 23 Aug 2007) Log Message: ----------- Redistribution of project components Modified Paths: -------------- trunk/jsf4portlets/pom.xml Added Paths: ----------- trunk/jsf4portlets/ Removed Paths: ------------- trunk/jsf4portlets-core/ Copied: trunk/jsf4portlets (from rev 24, trunk/jsf4portlets-core) Modified: trunk/jsf4portlets/pom.xml =================================================================== --- trunk/jsf4portlets-core/pom.xml 2007-08-23 17:11:29 UTC (rev 24) +++ trunk/jsf4portlets/pom.xml 2007-08-23 17:18:01 UTC (rev 25) @@ -7,7 +7,7 @@ <version>1.0-alpha-2-SNAPSHOT</version> </parent> - <artifactId>jsf4portlets-core</artifactId> + <artifactId>jsf4portlets</artifactId> <packaging>jar</packaging> <name>JSF 4 Portlets Core</name> @@ -71,7 +71,6 @@ </reporting> <build> - <finalName>jsf4portlets</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-08-23 17:29:24
|
Revision: 26 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=26&view=rev Author: alonsoft Date: 2007-08-23 10:29:22 -0700 (Thu, 23 Aug 2007) Log Message: ----------- Revision of maven files. Modified Paths: -------------- trunk/jsf4portlets/pom.xml trunk/pom.xml trunk/src/assembly/bin.xml Added Paths: ----------- trunk/src/ trunk/src/assembly/ Removed Paths: ------------- trunk/jsf4portlets/src/assembly/ Modified: trunk/jsf4portlets/pom.xml =================================================================== --- trunk/jsf4portlets/pom.xml 2007-08-23 17:18:01 UTC (rev 25) +++ trunk/jsf4portlets/pom.xml 2007-08-23 17:29:22 UTC (rev 26) @@ -71,26 +71,6 @@ </reporting> <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <descriptors> - <descriptor>src/assembly/bin.xml</descriptor> - <descriptor>src/assembly/src.xml</descriptor> - </descriptors> - </configuration> - </plugin> - </plugins> </build> </project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-08-23 17:18:01 UTC (rev 25) +++ trunk/pom.xml 2007-08-23 17:29:22 UTC (rev 26) @@ -79,17 +79,21 @@ </modules> <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugins> + </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> @@ -123,76 +127,83 @@ </reporting> <dependencyManagement> - <dependencies> - <dependency> - <groupId>javax.el</groupId> - <artifactId>el-api</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <version>2.1</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - <version>1.2</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.portlet</groupId> - <artifactId>portlet-api</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> + <dependencies> + <dependency> + <groupId>javax.el</groupId> + <artifactId>el-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + <version>1.2</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>jsr250-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.portlet</groupId> + <artifactId>portlet-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> - <dependency> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - <version>1.8</version> - <scope>compile</scope> - <exclusions> - <exclusion> - <artifactId>avalon-framework</artifactId> - <groupId>avalon-framework</groupId> - </exclusion> - <exclusion> - <artifactId>log4j</artifactId> - <groupId>log4j</groupId> - </exclusion> - <exclusion> - <artifactId>logkit</artifactId> - <groupId>logkit</groupId> - </exclusion> - <exclusion> - <artifactId>servlet-api</artifactId> - <groupId>javax.servlet</groupId> - </exclusion> - </exclusions> - </dependency> + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + <version>1.8</version> + <scope>compile</scope> + <exclusions> + <exclusion> + <artifactId>avalon-framework</artifactId> + <groupId>avalon-framework</groupId> + </exclusion> + <exclusion> + <artifactId>log4j</artifactId> + <groupId>log4j</groupId> + </exclusion> + <exclusion> + <artifactId>logkit</artifactId> + <groupId>logkit</groupId> + </exclusion> + <exclusion> + <artifactId>servlet-api</artifactId> + <groupId>javax.servlet</groupId> + </exclusion> + </exclusions> + </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - </dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + </dependencies> </dependencyManagement> </project> Copied: trunk/src/assembly (from rev 25, trunk/jsf4portlets/src/assembly) Modified: trunk/src/assembly/bin.xml =================================================================== --- trunk/jsf4portlets/src/assembly/bin.xml 2007-08-23 17:18:01 UTC (rev 25) +++ trunk/src/assembly/bin.xml 2007-08-23 17:29:22 UTC (rev 26) @@ -29,6 +29,25 @@ <format>tar.bz2</format> <format>zip</format> </formats> + <moduleSets> + <moduleSet> + <includes> + <include>net.sf.jsf4portlets:jsf4portlets</include> + <include>net.sf.jsf4portlets:jsf4portlets-ext</include> + </includes> + <binaries> + <outputDirectory>/lib</outputDirectory> + <unpack>false</unpack> + <includeDependecies>false</includeDependencies> + <dependencySets> + <dependencySet> + <outputDirectory>/lib</outputDirectory> + <scope>runtime</scope> + </dependencySet> + </dependencySets> + </binaries> + </moduleSet> + </moduleSets> <fileSets> <fileSet> <includes> @@ -59,10 +78,4 @@ </includes> </fileSet> </fileSets> - <dependencySets> - <dependencySet> - <outputDirectory>/lib</outputDirectory> - <scope>runtime</scope> - </dependencySet> - </dependencySets> </assembly> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-09-03 09:53:03
|
Revision: 27 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=27&view=rev Author: alonsoft Date: 2007-09-03 01:08:54 -0700 (Mon, 03 Sep 2007) Log Message: ----------- Fixed parent's pom.xml Modified Paths: -------------- trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/ViewHandlerImpl.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties trunk/jsf4portlets-ext/pom.xml trunk/pom.xml Added Paths: ----------- trunk/jsf4portlets-ext/src/ trunk/jsf4portlets-ext/src/main/ trunk/jsf4portlets-ext/src/main/java/ trunk/jsf4portlets-ext/src/main/java/net/ trunk/jsf4portlets-ext/src/main/java/net/sf/ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxConstants.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletContext.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletLifecycleListener.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletViewRootRenderer.java trunk/jsf4portlets-ext/src/main/resources/ trunk/jsf4portlets-ext/src/main/resources/META-INF/ trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml Modified: trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java =================================================================== --- trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java 2007-08-23 17:29:22 UTC (rev 26) +++ trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java 2007-09-03 08:08:54 UTC (rev 27) @@ -63,7 +63,7 @@ if (additionalId != null) return namespace + additionalId; else - return namespace; + return namespace.substring(0, namespace.length() - 1); } else { return null; } Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/ViewHandlerImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/ViewHandlerImpl.java 2007-08-23 17:29:22 UTC (rev 26) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/ViewHandlerImpl.java 2007-09-03 08:08:54 UTC (rev 27) @@ -42,6 +42,7 @@ import javax.faces.context.ResponseWriter; import javax.faces.render.RenderKit; import javax.faces.render.RenderKitFactory; +import javax.portlet.PortletConfig; import javax.portlet.PortletContext; import javax.portlet.RenderResponse; import javax.portlet.faces.Bridge; @@ -52,6 +53,7 @@ import net.sf.jsf4portlets.BridgeConstants; import net.sf.jsf4portlets.config.PortletConfiguration; import net.sf.jsf4portlets.config.PortletConfiguration.PortletParameter; +import net.sf.jsf4portlets.util.Util; public class ViewHandlerImpl extends ViewHandlerWrapper { @@ -98,6 +100,14 @@ viewRoot.getClass().getName())) { viewRoot = new PortletNamingContainerUIViewRoot(viewRoot); } + + if(logger.isLoggable(Level.FINE)) { + PortletConfig portletConfig = Util + .getPortletConfig(context.getExternalContext()); + logger.log(Level.FINE, "J4P_000044", new Object[]{ + viewRoot.getClass().getName(), portletConfig.getPortletName() + }); + } } return viewRoot; } Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2007-08-23 17:29:22 UTC (rev 26) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2007-09-03 08:08:54 UTC (rev 27) @@ -206,8 +206,8 @@ portletURL.setParameter(BridgeConstants.VIEW_ID_PARAMETER, viewId); result = portletURL.toString(); } else if(PortletPhase.ActionPhase.equals(phase)) { - //RequestScope requestScope = Util.getRequestScope(this); - //requestScope.setParameters(qs.getParameterMap()); + RequestScope requestScope = Util.getRequestScope(this); + requestScope.setParameters(qs.getParameterMap()); result = viewId; } else { throw new IllegalStateException(); @@ -430,10 +430,8 @@ viewId = requestScope.getViewId(); } } else if(PortletPhase.ActionPhase.equals(phase)) { - if(viewId == null) { - viewId = getRequestParameterMap().get( + viewId = getRequestParameterMap().get( BridgeConstants.VIEW_ID_PARAMETER); - } } if(viewId == null) { viewId = (String) getRequestMap().get( Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java 2007-08-23 17:29:22 UTC (rev 26) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java 2007-09-03 08:08:54 UTC (rev 27) @@ -92,6 +92,7 @@ } this.econtext = econtext; this.lifecycle = lifecycle; + setCurrentInstance(this); logger.log(Level.FINEST, "J4P_000031", this); } @@ -260,6 +261,7 @@ renderResponse = false; responseComplete = false; viewRoot = null; + // Make sure to clear our ThreadLocal instance. setCurrentInstance(null); } Modified: trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties =================================================================== --- trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties 2007-08-23 17:29:22 UTC (rev 26) +++ trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties 2007-09-03 08:08:54 UTC (rev 27) @@ -60,4 +60,5 @@ J4P_000040=J4P000040: Executing faces context previous to render. J4P_000041=J4P000041: RestoreView phase has been invoked during bridge's RENDER_PHASE. Cortocircuiting faces lifecycle. J4P_000042=J4P000042: Exception caught when delegating the faces request during renderView. -J4P_000043=J4P000043: Portlet {0} has init param {1} but it is deprecated. It should be replaced by {2}. +J4P_000043=J4P000043: Portlet {0} has init param {1} but it is deprecated. It should be replaced by {2}. +J4P_000044=J4P000044: Using {0} as view root for portlet {1} Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2007-08-23 17:29:22 UTC (rev 26) +++ trunk/jsf4portlets-ext/pom.xml 2007-09-03 08:08:54 UTC (rev 27) @@ -44,9 +44,22 @@ </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets</artifactId> + </dependency> + <dependency> + <groupId>org.ajax4jsf</groupId> + <artifactId>ajax4jsf</artifactId> </dependency> + <dependency> + <groupId>com.sun.facelets</groupId> + <artifactId>jsf-facelets</artifactId> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> </dependencies> <reporting> @@ -71,26 +84,6 @@ </reporting> <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <descriptors> - <descriptor>src/assembly/bin.xml</descriptor> - <descriptor>src/assembly/src.xml</descriptor> - </descriptors> - </configuration> - </plugin> - </plugins> </build> </project> Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxConstants.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxConstants.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxConstants.java 2007-09-03 08:08:54 UTC (rev 27) @@ -0,0 +1,16 @@ +package net.sf.jsf4portlets.ajax; + +public final class AjaxConstants { + + public static final String ACTION_URL_PARAM = + "org.ajax4jsf.portlet.ACTION_URL"; + + public static final String NAMESPACE_PARAM = + "org.ajax4jsf.portlet.NAMESPACE"; + + public static final String PORTLET_MODE_PARAM = + "org.ajax4jsf.portlet.PORTLET_MODE"; + + private AjaxConstants() { } + +} Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletContext.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletContext.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletContext.java 2007-09-03 08:08:54 UTC (rev 27) @@ -0,0 +1,61 @@ +package net.sf.jsf4portlets.ajax; + +import javax.faces.component.UIViewRoot; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; + +import org.ajax4jsf.framework.ajax.AjaxContext; +import org.ajax4jsf.framework.util.config.WebXml; + +public class AjaxPortletContext extends AjaxContext { + + @Override + public String getAjaxActionURL(FacesContext context) { + if(context == null) { + throw new NullPointerException("FacesContext is null"); + } + + UIViewRoot viewRoot = context.getViewRoot(); + if(viewRoot == null) { + throw new NullPointerException("Faces' view tree is null"); + } + + String viewId = viewRoot.getViewId(); + if(viewId == null) { + throw new NullPointerException("Faces' viewId is null"); + } + if(!viewId.startsWith("/")) { + throw new IllegalArgumentException("Illegal viewId: " + viewId); + } + + ExternalContext externalContext = context.getExternalContext(); + WebXml webXml = (WebXml) externalContext + .getApplicationMap().get(WebXml.CONTEXT_ATTRIBUTE); + if(webXml == null) { + throw new IllegalStateException("Ajax Filter not properly configured"); + } + + StringBuffer actionURL = new StringBuffer( + externalContext.getRequestContextPath()); + if(webXml.isPrefixMapping()) { + String facesFilterPrefix = webXml.getFacesFilterPrefix(); + if(facesFilterPrefix.endsWith("/")) { + facesFilterPrefix = facesFilterPrefix + .substring(0, facesFilterPrefix.length() - 1); + } + actionURL.append(facesFilterPrefix).append(viewId); + } else { + int dot = viewId.lastIndexOf('.'); + if(dot < 0) { + actionURL.append(viewId).append( + webXml.getFacesFilterSuffix()); + } else { + actionURL.append(viewId.substring(0, dot)) + .append(webXml.getFacesFilterSuffix()); + } + } + + return externalContext.encodeActionURL(actionURL.toString()); + } + +} Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletLifecycleListener.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletLifecycleListener.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletLifecycleListener.java 2007-09-03 08:08:54 UTC (rev 27) @@ -0,0 +1,52 @@ +package net.sf.jsf4portlets.ajax; + +import javax.faces.application.ViewHandler; +import javax.faces.component.UIViewRoot; +import javax.faces.context.FacesContext; +import javax.faces.event.PhaseEvent; +import javax.faces.event.PhaseId; +import javax.faces.event.PhaseListener; +import javax.portlet.RenderRequest; +import javax.portlet.faces.component.PortletNamingContainer; +import javax.portlet.faces.component.PortletNamingContainerUIViewRoot; + +import org.ajax4jsf.framework.ajax.AjaxContext; + +public class AjaxPortletLifecycleListener implements PhaseListener { + + public void afterPhase(PhaseEvent event) {} + + @SuppressWarnings("unchecked") + public void beforePhase(PhaseEvent event) { + FacesContext context = event.getFacesContext(); + ViewHandler viewHandler = context.getApplication().getViewHandler(); + RenderRequest request = (RenderRequest) context + .getExternalContext().getRequest(); + + AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context); + String viewId = context.getViewRoot().getViewId(); + String actionURL = viewHandler.getActionURL(context, viewId); + ajaxContext.getCommonAjaxParameters().put( + AjaxConstants.ACTION_URL_PARAM, actionURL); + + String portletMode = request.getPortletMode().toString(); + ajaxContext.getCommonAjaxParameters().put( + AjaxConstants.PORTLET_MODE_PARAM, portletMode); + + String namespace; + UIViewRoot viewRoot = context.getViewRoot(); + if(viewRoot instanceof PortletNamingContainer) { + namespace = viewRoot.getClientId(context); + } else { + namespace = PortletNamingContainerUIViewRoot.getContainerClientId( + context, viewRoot.getContainerClientId(context)); + } + ajaxContext.getCommonAjaxParameters().put( + AjaxConstants.NAMESPACE_PARAM, namespace); + } + + public PhaseId getPhaseId() { + return PhaseId.RENDER_RESPONSE; + } + +} Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletViewRootRenderer.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletViewRootRenderer.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/AjaxPortletViewRootRenderer.java 2007-09-03 08:08:54 UTC (rev 27) @@ -0,0 +1,56 @@ +package net.sf.jsf4portlets.ajax; + +import java.io.IOException; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.context.ResponseWriter; +import javax.portlet.faces.component.PortletNamingContainerUIViewRoot; + +import org.ajax4jsf.framework.ajax.AjaxContext; +import org.ajax4jsf.framework.renderer.AjaxContainerRenderer; +import org.ajax4jsf.framework.renderer.AjaxRendererUtils; +import org.ajax4jsf.framework.renderer.AjaxViewRootRenderer; + +public class AjaxPortletViewRootRenderer extends AjaxViewRootRenderer { + + @Override + protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) + throws IOException { + AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context); + String namespace = PortletNamingContainerUIViewRoot + .getContainerClientId(context, null); + String ajaxParameterName = context.getExternalContext() + .getRequestParameterMap().get(AjaxContainerRenderer.AJAX_PARAMETER_NAME); + + if(!ajaxContext.isAjaxRequest() && null != namespace && null != ajaxParameterName) { + // Navigation, encode window + writer.startElement("div", component); + writer.writeAttribute("id", namespace, null); + } + + super.doEncodeBegin(writer, context, component); + } + + @Override + protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) + throws IOException { + super.doEncodeEnd(writer, context, component); + + AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context); + String namespace = PortletNamingContainerUIViewRoot + .getContainerClientId(context, null); + String ajaxParameterName = context.getExternalContext() + .getRequestParameterMap().get(AjaxContainerRenderer.AJAX_PARAMETER_NAME); + + if(!ajaxContext.isAjaxRequest() && null != namespace && null != ajaxParameterName) { + writer.endElement("div"); + ajaxContext.setAjaxRequest(true); + ajaxContext.addRenderedArea(namespace); + AjaxRendererUtils.encodeAreas(context, component); + } + } + + + +} Added: trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml =================================================================== --- trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml (rev 0) +++ trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml 2007-09-03 08:08:54 UTC (rev 27) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2007 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + +<faces-config xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" + version="1.2"> + + <lifecycle> + <phase-listener> + net.sf.jsf4portlets.ajax.AjaxPortletLifecycleListener + </phase-listener> + </lifecycle> + + <managed-bean> + <managed-bean-name>ajaxContext</managed-bean-name> + <managed-bean-class> + net.sf.jsf4portlets.ajax.AjaxPortletContext + </managed-bean-class> + <managed-bean-scope>request</managed-bean-scope> + </managed-bean> + + <render-kit> + <renderer> + <component-family> + javax.faces.ViewRoot + </component-family> + <renderer-type> + javax.faces.ViewRoot + </renderer-type> + <renderer-class> + net.sf.jsf4portlets.ajax.AjaxPortletViewRootRenderer + </renderer-class> + </renderer> + </render-kit> + +</faces-config> \ No newline at end of file Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-08-23 17:29:22 UTC (rev 26) +++ trunk/pom.xml 2007-09-03 08:08:54 UTC (rev 27) @@ -74,7 +74,7 @@ </distributionManagement> <modules> - <module>jsf4portlets-core</module> + <module>jsf4portlets</module> <module>jsf4portlets-ext</module> </modules> @@ -89,7 +89,7 @@ <target>1.5</target> </configuration> </plugin> - <plugins> + </plugins> </pluginManagement> <plugins> <plugin> @@ -191,18 +191,34 @@ </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> + <groupId>org.ajax4jsf</groupId> + <artifactId>ajax4jsf</artifactId> + <version>1.1.1</version> + <scope>compile</scope> + <optional>true</optional> </dependency> <dependency> + <groupId>com.sun.facelets</groupId> + <artifactId>jsf-facelets</artifactId> + <version>1.1.11</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + + <dependency> <groupId>net.sf.jsf4portlets</groupId> <artifactId>jsf4portlets</artifactId> <version>${pom.version}</version> <scope>compile</scope> </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> </dependencies> </dependencyManagement> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-09-26 17:47:39
|
Revision: 29 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=29&view=rev Author: alonsoft Date: 2007-09-26 10:47:31 -0700 (Wed, 26 Sep 2007) Log Message: ----------- Website and docs updated Modified Paths: -------------- trunk/jsf4portlets/pom.xml trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/BridgeImpl.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/BridgeLifecycleListener.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/renderkit/ResponseStateManagerWrapper.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/Util.java trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties trunk/jsf4portlets-ext/pom.xml trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml trunk/pom.xml trunk/src/assembly/bin.xml trunk/src/site/apt/download.apt trunk/src/site/apt/release_notes.apt trunk/src/site/apt/user_docs.apt trunk/src/site/site.xml trunk/src/site/xdoc/getting_started.xml Added Paths: ----------- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/ContainerInjectionProvider.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/GenericInjectionProvider.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider trunk/src/legal/ trunk/src/site/ Removed Paths: ------------- trunk/jsf4portlets/src/legal/ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/ext/ trunk/jsf4portlets/src/main/resources/META-INF/jsf4portlets.tld trunk/jsf4portlets/src/site/ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/ajax/ Modified: trunk/jsf4portlets/pom.xml =================================================================== --- trunk/jsf4portlets/pom.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/pom.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -12,6 +12,11 @@ <name>JSF 4 Portlets Core</name> + <description> + This is the main module of JSF 4 Portlets. This module brings an implementation of + the JSF Portlet Bridge (JSR-301) which allows JSR-168 Portlets running as JSF applications. + </description> + <dependencies> <dependency> <groupId>javax.el</groupId> @@ -42,6 +47,11 @@ <groupId>commons-digester</groupId> <artifactId>commons-digester</artifactId> </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>catalina</artifactId> + </dependency> <dependency> <groupId>junit</groupId> @@ -63,10 +73,6 @@ <groupId>net.sourceforge.maven-taglib</groupId> <artifactId>maven-taglib-plugin</artifactId> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-changelog-plugin</artifactId> - </plugin> </plugins> </reporting> Modified: trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java =================================================================== --- trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/javax/portlet/faces/component/PortletNamingContainerUIViewRoot.java 2007-09-26 17:47:31 UTC (rev 29) @@ -70,6 +70,7 @@ } // Implement the method that satisfies NamingContainer + @Override public String getContainerClientId(FacesContext context) { return PortletNamingContainerUIViewRoot.getContainerClientId( context, super.getContainerClientId(context)); Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/BridgeImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/BridgeImpl.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/BridgeImpl.java 2007-09-26 17:47:31 UTC (rev 29) @@ -78,6 +78,7 @@ facesContextFactory = null; lifecycle = null; portletConfig = null; + requestScopeManager = null; logger.log(Level.FINEST, "J4P_000004", getPortletName()); } Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java 2007-09-26 17:47:31 UTC (rev 29) @@ -51,7 +51,13 @@ import net.sf.jsf4portlets.config.PortletConfiguration; import net.sf.jsf4portlets.config.PortletConfiguration.BooleanPortletParameter; import net.sf.jsf4portlets.util.Util; - + +/** + * Manages the state of the request scope + * + * @author A. Alonso Dominguez + * + */ public class RequestScopeManager { public static final int DEFAULT_MAX_MANAGED_REQUEST_SCOPES = 1000; @@ -70,11 +76,20 @@ private int maxRequestScopes; - public RequestScopeManager(int maxRequestScopes) { + public RequestScopeManager(int maxRequestScopes) { + if(maxRequestScopes < 0) { + throw new IllegalArgumentException(); + } + this.maxRequestScopes = maxRequestScopes; scopes = new HashMap<String, RequestScope>(this.maxRequestScopes); } - + + /** + * Restores the current request scope into the given <code>FacesContext</code> + * + * @param context the current <code>FacesContext</code> + */ public void restore(FacesContext context) { ExternalContext extContext = context.getExternalContext(); PortletRequest request = (PortletRequest) extContext.getRequest(); @@ -140,7 +155,13 @@ request.setAttribute(BridgeConstants.REQUEST_SCOPE, scope); releasePreviousRequestScope(request); } - + + /** + * Stores the current state of the <code>FacesContext</code> into the + * request scope for later use. + * + * @param context the current <code>FacesContext</code> + */ @SuppressWarnings("unchecked") public void save(FacesContext context) { ExternalContext extContext = context.getExternalContext(); @@ -219,7 +240,8 @@ } } - scope.setViewRoot(context.getViewRoot()); + scope.setViewRoot(context.getViewRoot()); + scope.setViewId(null); } if(scope != null) { Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/BridgeLifecycleListener.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/BridgeLifecycleListener.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/application/BridgeLifecycleListener.java 2007-09-26 17:47:31 UTC (rev 29) @@ -21,18 +21,17 @@ package net.sf.jsf4portlets.application; import java.util.logging.Level; -import java.util.logging.LogRecord; import java.util.logging.Logger; -import javax.portlet.*; -import javax.faces.component.*; +import javax.faces.component.UIViewRoot; import javax.faces.context.FacesContext; import javax.faces.event.PhaseEvent; import javax.faces.event.PhaseId; import javax.faces.event.PhaseListener; -import javax.portlet.faces.*; +import javax.portlet.PortletResponse; +import javax.portlet.faces.Bridge; import javax.portlet.faces.Bridge.PortletPhase; -import javax.portlet.faces.component.*; +import javax.portlet.faces.component.PortletNamingContainerUIViewRoot; import net.sf.jsf4portlets.util.Util; Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java 2007-09-26 17:47:31 UTC (rev 29) @@ -28,9 +28,7 @@ import java.util.logging.Logger; import javax.faces.context.ExternalContext; -import javax.servlet.ServletContext; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import javax.portlet.PortletContext; import org.apache.commons.digester.Digester; import org.xml.sax.SAXException; @@ -42,7 +40,7 @@ * @author A. Alonso Dominguez * @version 1.0 */ -public final class ApplicationConfiguration implements ServletContextListener { +public final class ApplicationConfiguration { private static final String INSTANCE_KEY = ApplicationConfiguration.class.getName(); @@ -56,8 +54,14 @@ "javax.faces.webapp.FacesServlet"; public static ApplicationConfiguration getInstance(ExternalContext context) { - return (ApplicationConfiguration) context + ApplicationConfiguration result = (ApplicationConfiguration) context .getApplicationMap().get(INSTANCE_KEY); + if(result == null) { + PortletContext portletContext = (PortletContext) context.getContext(); + result = new ApplicationConfiguration(); + result.configure(portletContext); + } + return result; } private final Logger logger = Logger.getLogger( @@ -112,53 +116,44 @@ public Enumeration<String> getManagedBeanNames() { return facesConfig.getManagedBeanNames(); } - - // ServletContextListener - - public void contextInitialized(ServletContextEvent event) { - ServletContext servletContext = event.getServletContext(); - if(isFacesApp(servletContext)) { + protected void configure(PortletContext portletContext) { + if(isFacesApp(portletContext)) { logger.log(Level.INFO, "J4P_000028", - servletContext.getContextPath()); + portletContext.getPortletContextName()); try { - facesConfig = loadFacesConfig(servletContext); - webappConfig = loadWebXml(servletContext); + facesConfig = loadFacesConfig(portletContext); + webappConfig = loadWebXml(portletContext); } catch(Exception e) { throw new ExceptionInInitializerError(e); } - servletContext.setAttribute(INSTANCE_KEY, this); + portletContext.setAttribute(INSTANCE_KEY, this); } } - public void contextDestroyed(ServletContextEvent event) { - ServletContext servletContext = event.getServletContext(); - servletContext.removeAttribute(INSTANCE_KEY); - } - private Digester createDigester() { Digester digester = new Digester(); digester.setClassLoader(Thread.currentThread().getContextClassLoader()); return digester; } - private InputStream getStream(ServletContext servletContext, String path) + private InputStream getStream(PortletContext portletContext, String path) throws IOException { - InputStream in = servletContext.getResourceAsStream(path); + InputStream in = portletContext.getResourceAsStream(path); if(in == null) { throw new FileNotFoundException( - servletContext.getRealPath(path)); + portletContext.getRealPath(path)); } return in; } - private boolean isFacesApp(ServletContext servletContext) { - InputStream in = servletContext.getResourceAsStream(FACES_CONFIG_XML); + private boolean isFacesApp(PortletContext portletContext) { + InputStream in = portletContext.getResourceAsStream(FACES_CONFIG_XML); return (in != null); } - private FacesConfigBean loadFacesConfig(ServletContext servletContext) + private FacesConfigBean loadFacesConfig(PortletContext portletContext) throws IOException, SAXException { Digester digester = createDigester(); @@ -169,11 +164,11 @@ digester.addBeanPropertySetter("faces-config/managed-bean/managed-bean-class", "className"); digester.addBeanPropertySetter("faces-config/managed-bean/managed-bean-scope", "scope"); - InputStream in = getStream(servletContext, FACES_CONFIG_XML); + InputStream in = getStream(portletContext, FACES_CONFIG_XML); return (FacesConfigBean) digester.parse(in); } - private WebAppBean loadWebXml(ServletContext servletContext) + private WebAppBean loadWebXml(PortletContext portletContext) throws IOException, SAXException { Digester digester = createDigester(); @@ -187,7 +182,7 @@ digester.addCallParam("web-app/servlet-mapping/servlet-name", 0); digester.addCallParam("web-app/servlet-mapping/url-pattern", 1); - InputStream in = getStream(servletContext, WEB_APP_XML); + InputStream in = getStream(portletContext, WEB_APP_XML); return (WebAppBean) digester.parse(in); } Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/renderkit/ResponseStateManagerWrapper.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/renderkit/ResponseStateManagerWrapper.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/renderkit/ResponseStateManagerWrapper.java 2007-09-26 17:47:31 UTC (rev 29) @@ -31,7 +31,7 @@ import net.sf.jsf4portlets.util.Util; /** - * @author alonso + * @author A. Alonso Dominguez * */ public class ResponseStateManagerWrapper extends ResponseStateManager { @@ -43,8 +43,10 @@ } /** - * @param arg0 - * @return + * Obtains an object which represents the components' state for restore. + * + * @param context the current <code>FacesContext</code> + * @return the components' state * @deprecated * @see javax.faces.render.ResponseStateManager#getComponentStateToRestore(javax.faces.context.FacesContext) */ @@ -54,9 +56,11 @@ } /** - * @param arg0 - * @param arg1 - * @return + * Obtains the current state of the given view + * + * @param context the current <code>FacesContext</code> + * @param viewId the current <code>viewId</code> + * @return the view state * @see javax.faces.render.ResponseStateManager#getState(javax.faces.context.FacesContext, java.lang.String) */ public Object getState(FacesContext context, String viewId) { @@ -64,9 +68,11 @@ } /** - * @param arg0 - * @param arg1 - * @return + * Obtains the tree structure for restore + * + * @param context the current <code>FacesContext</code> + * @param treeId the current <code>treeId</code> + * @return the tree structure * @deprecated * @see javax.faces.render.ResponseStateManager#getTreeStructureToRestore(javax.faces.context.FacesContext, java.lang.String) */ @@ -76,8 +82,10 @@ } /** - * @param arg0 - * @return + * Checks if the bridge is performing a postback + * + * @param context the current <code>FacesContext</code> + * @return <code>true</code> - if we are inside a postback request, <code>false</code> otherwise. * @see javax.faces.render.ResponseStateManager#isPostback(javax.faces.context.FacesContext) */ public boolean isPostback(FacesContext context) { @@ -90,9 +98,13 @@ } /** - * @param arg0 - * @param arg1 - * @throws IOException + * Writes the current state of the view into the request scope, + * then delegate to wrapped response state manager so view state + * can be written to the response too. + * + * @param context the current <code>FacesContext</code> + * @param view the view state to be written. + * @throws IOException * @deprecated * @see javax.faces.render.ResponseStateManager#writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView) */ Added: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/ContainerInjectionProvider.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/ContainerInjectionProvider.java (rev 0) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/ContainerInjectionProvider.java 2007-09-26 17:47:31 UTC (rev 29) @@ -0,0 +1,36 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.spi; + +import net.sf.jsf4portlets.util.Util; + +public abstract class ContainerInjectionProvider implements InjectionProvider { + + public static boolean isInjectionFeatureEnabled(String delegateClass) { + try { + Util.loadClass(delegateClass, null); + return true; + } catch(ClassNotFoundException e) { + return false; + } + } + +} Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java 2007-09-26 17:47:31 UTC (rev 29) @@ -20,15 +20,23 @@ */ package net.sf.jsf4portlets.spi; -import java.lang.reflect.Method; +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.List; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; -import javax.annotation.PreDestroy; import javax.faces.context.ExternalContext; +import javax.portlet.PortletContext; import net.sf.jsf4portlets.BridgeConstants; +import net.sf.jsf4portlets.util.Util; +import net.sf.jsf4portlets.vendor.GenericInjectionProvider; /** * @author A. Alonso Dom\xEDnguez @@ -41,8 +49,19 @@ private static final InjectionProvider NOOP_PROVIDER = new NoopInjectionProvider(); + private static final InjectionProvider GENERIC_INJECTION_PROVIDER = + new GenericInjectionProvider(); + + private static final String[] EMPTY_ARRAY = new String[0]; + + private static final String INJECTION_PROVIDER_PROPERTY = + "net.sf.jsf4portlets.injection_provider"; + + private static final String INJECTION_SERVICE = + "META-INF/services/" + InjectionProvider.class.getName(); + private static Logger logger = Logger.getLogger( - "net.sf.jsf4portlets.application", + InjectionProviderFactory.class.getPackage().getName(), "net.sf.jsf4portlets.LogMessages"); static { @@ -57,7 +76,7 @@ public static InjectionProvider createInstance(ExternalContext context) { String providerClass = findProviderClass(context); - InjectionProvider provider = getProviderInstance(providerClass); + InjectionProvider provider = getProviderInstance(providerClass, context); if(provider.getClass() != NoopInjectionProvider.class) { if(logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "J4P_000037", providerClass); @@ -73,21 +92,56 @@ private static String findProviderClass(ExternalContext context) { String provider = context.getInitParameter( BridgeConstants.INJECTION_PROVIDER); - return (provider != null) ? provider : - System.getProperty(BridgeConstants.INJECTION_PROVIDER); + if(provider != null) { + return provider; + } else { + provider = System.getProperty(INJECTION_PROVIDER_PROPERTY); + } + + if(provider != null) { + return provider; + } else { + String[] serviceEntries = getServiceEntries(); + if(serviceEntries.length > 0) { + for(int i = 0;i < serviceEntries.length;i++) { + provider = getProviderFromEntry(serviceEntries[i]); + if(provider != null) { + break; + } + } + } else { + return null; + } + } + + return provider; } - private static InjectionProvider getProviderInstance(String className) { + private static InjectionProvider getProviderInstance(String className, + ExternalContext context) { if(!INJECTION_ENABLED) { return NOOP_PROVIDER; } - InjectionProvider provider = new DefaultInjectionProvider(); + InjectionProvider provider = GENERIC_INJECTION_PROVIDER; if(className != null) { try { Class<?> clazz = Class.forName(className, true, InjectionProviderFactory.class.getClassLoader()); if(clazz.isAssignableFrom(InjectionProvider.class)) { - provider = (InjectionProvider) clazz.newInstance(); + try { + Constructor<?> cons = clazz.getConstructor(PortletContext.class); + provider = (InjectionProvider) cons.newInstance( + (PortletContext) context.getContext()); + } catch(NoSuchMethodException e) { + provider = (InjectionProvider) clazz.newInstance(); + } catch(InvocationTargetException e) { + if(logger.isLoggable(Level.SEVERE)) { + LogRecord logRecord = new LogRecord(Level.SEVERE, "J4P_000036"); + logRecord.setParameters(new Object[]{ className }); + logRecord.setThrown(e); + logger.log(logRecord); + } + } } else { if(logger.isLoggable(Level.SEVERE)) { logger.log(Level.SEVERE, "J4P_000035", className); @@ -116,24 +170,74 @@ return provider; } - private static class DefaultInjectionProvider implements InjectionProvider { - - public void invokePreDestroy(Object managedBean) - throws InjectionProviderException { - Class<?> managedBeanClass = managedBean.getClass(); - for(Method method : managedBeanClass.getDeclaredMethods()) { - if(!method.isAnnotationPresent(PreDestroy.class)) { - continue; + private static String getProviderFromEntry(String entry) { + if(entry == null || entry.length() == 0) { + return null; + } + + String[] parts = entry.split(":"); + if(parts.length != 2) { + // TODO log about this problem + return null; + } + + try { + Class<?> clazz = Util.loadClass(parts[0], null); + if(ContainerInjectionProvider.class.isAssignableFrom(clazz)) { + if(ContainerInjectionProvider.isInjectionFeatureEnabled(parts[1])) { + return parts[0]; } - + } else { + // TODO Entry not discoverable + return null; + } + } catch(ClassNotFoundException e) { + // TODO provider not found + return null; + } + + return null; + } + + private static String[] getServiceEntries() { + String[] results = EMPTY_ARRAY; + ClassLoader loader = Util.getClassLoader(null); + + InputStream stream = null; + BufferedReader reader = null; + try { + stream = loader.getResourceAsStream(INJECTION_SERVICE); + if(stream != null) { try { - method.invoke(managedBean); + reader = new BufferedReader(new InputStreamReader(stream, "UTF-8")); } catch(Exception e) { - throw new InjectionProviderException(e); + reader = new BufferedReader(new InputStreamReader(stream)); } + List<String> list = new ArrayList<String>(); + for(String line = reader.readLine();line != null;line = reader.readLine()) { + list.add(line.trim()); + } + results = list.toArray(new String[list.size()]); } + } catch(Exception e) { + if(logger.isLoggable(Level.SEVERE)) { + logger.log(Level.SEVERE, "J4P_000049", e); + } + results = EMPTY_ARRAY; + } finally { + if(stream != null) { + try { + stream.close(); + } catch(Exception e) { } + } + if(reader != null) { + try { + reader.close(); + } catch(Exception e) { } + } } + return results; } private static class NoopInjectionProvider implements InjectionProvider { Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/Util.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/Util.java 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/Util.java 2007-09-26 17:47:31 UTC (rev 29) @@ -106,10 +106,20 @@ return mapping.startsWith("/"); } + public static Class<?> loadClass(String className, Object caller) + throws ClassNotFoundException { + ClassLoader loader = getClassLoader(caller); + return loader.loadClass(className); + } + public static ClassLoader getClassLoader(Object caller) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if(loader == null) { - loader = caller.getClass().getClassLoader(); + if(caller != null) { + loader = caller.getClass().getClassLoader(); + } else { + loader = Util.class.getClassLoader(); + } } return loader; } Added: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/GenericInjectionProvider.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/GenericInjectionProvider.java (rev 0) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/GenericInjectionProvider.java 2007-09-26 17:47:31 UTC (rev 29) @@ -0,0 +1,124 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.vendor; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.annotation.PreDestroy; + +import net.sf.jsf4portlets.spi.InjectionProvider; +import net.sf.jsf4portlets.spi.InjectionProviderException; + +public class GenericInjectionProvider implements InjectionProvider { + + private final Logger logger = Logger.getLogger( + GenericInjectionProvider.class.getPackage().getName(), + "net.sf.jsf4portlets.LogMessages"); + + public void invokePreDestroy(Object managedBean) + throws InjectionProviderException { + if(managedBean != null) { + Method annotatedMethod = getAnnotatedMethod( + managedBean, PreDestroy.class); + invokeMethod(managedBean, annotatedMethod); + } + } + + private void invokeMethod(Object managedBean, Method method) + throws InjectionProviderException { + if(method != null) { + boolean accessible = method.isAccessible(); + method.setAccessible(true); + try { + method.invoke(managedBean); + } catch(Exception e) { + throw new InjectionProviderException(e); + } finally { + method.setAccessible(accessible); + } + } + } + + private Method getAnnotatedMethod(Object managedBean, + Class<? extends Annotation> annotation) { + Class<?> clazz = managedBean.getClass(); + while(!Object.class.equals(clazz)) { + Method[] methods = clazz.getDeclaredMethods(); + for(Method method : methods) { + if(method.isAnnotationPresent(annotation)) { + // validate method + if(Modifier.isStatic(method.getModifiers())) { + if(logger.isLoggable(Level.WARNING)) { + logger.log(Level.WARNING, "J4P_000045", new Object[]{ + method.getName(), annotation.getName() + }); + } + continue; + } + if(!Void.TYPE.equals(method.getReturnType())) { + if(logger.isLoggable(Level.WARNING)) { + logger.log(Level.WARNING, "J4P_000046", new Object[]{ + method.getName(), annotation.getName() + }); + } + continue; + } + if(method.getParameterTypes().length != 0) { + if(logger.isLoggable(Level.WARNING)) { + logger.log(Level.WARNING, "J4P_000047", new Object[]{ + method.getName(), annotation.getName() + }); + } + continue; + } + Class<?>[] exceptions = method.getExceptionTypes(); + if(exceptions.length != 0) { + boolean hasChecked = false; + for(Class<?> excClass : exceptions) { + if(!RuntimeException.class.isAssignableFrom(excClass)) { + hasChecked = true; + break; + } + } + if(hasChecked) { + if(logger.isLoggable(Level.WARNING)) { + logger.log(Level.WARNING, "J4P_000048", new Object[]{ + method.getName(), annotation.getName() + }); + } + continue; + } + } + return method; + } + } + + clazz = clazz.getSuperclass(); + } + + return null; + } + +} Added: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java (rev 0) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java 2007-09-26 17:47:31 UTC (rev 29) @@ -0,0 +1,52 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.vendor; + +import javax.portlet.PortletContext; + +import net.sf.jsf4portlets.spi.ContainerInjectionProvider; +import net.sf.jsf4portlets.spi.InjectionProviderException; + +import org.apache.AnnotationProcessor; + +public class Tomcat6InjectionProvider extends ContainerInjectionProvider { + + private PortletContext portletContext; + + public Tomcat6InjectionProvider(PortletContext portletContext) { + this.portletContext = portletContext; + } + + public void invokePreDestroy(Object managedBean) + throws InjectionProviderException { + try { + getProcessor().preDestroy(managedBean); + } catch(Exception e) { + throw new InjectionProviderException(e); + } + } + + protected AnnotationProcessor getProcessor() { + return (AnnotationProcessor) portletContext.getAttribute( + AnnotationProcessor.class.getName()); + } + +} Modified: trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -48,18 +48,4 @@ </el-resolver> </application> - <component> - <description> - PortletPage component used to namespace portlet's - view components. - </description> - <display-name>Portlet Page</display-name> - <component-type> - net.sf.jsf4portlets.PortletPage - </component-type> - <component-class> - net.sf.jsf4portlets.ext.UIPortletPage - </component-class> - </component> - </faces-config> \ No newline at end of file Deleted: trunk/jsf4portlets/src/main/resources/META-INF/jsf4portlets.tld =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/jsf4portlets.tld 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/resources/META-INF/jsf4portlets.tld 2007-09-26 17:47:31 UTC (rev 29) @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - Copyright (C) 2007 A. Alonso Dominguez - - This library 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 library 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 library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - A. Alonso Dominguez - alo...@us... ---> - -<!DOCTYPE taglib - PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" - "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> - -<taglib> - <tlib-version>1.0</tlib-version> - <jsp-version>2.1</jsp-version> - <short-name>j4p</short-name> - <uri>http://jsf4portlets.sf.net/tld/jsf4portlets_1_0.tld</uri> - <display-name>JSF 4 Portlets TagLib</display-name> - - <listener> - <listener-class> - net.sf.jsf4portlets.config.ApplicationConfiguration - </listener-class> - </listener> - - <tag> - <name>portletPage</name> - <tag-class> - net.sf.jsf4portlets.ext.PortletPageTag - </tag-class> - <body-content>JSP</body-content> - <display-name>PortletPage Tag</display-name> - <description> - PortletPage component tag handler. - </description> - </tag> -</taglib> \ No newline at end of file Added: trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider (rev 0) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider 2007-09-26 17:47:31 UTC (rev 29) @@ -0,0 +1 @@ +net.sf.jsf4portlets.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor \ No newline at end of file Modified: trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties =================================================================== --- trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties 2007-09-26 17:47:31 UTC (rev 29) @@ -62,3 +62,8 @@ J4P_000042=J4P000042: Exception caught when delegating the faces request during renderView. J4P_000043=J4P000043: Portlet {0} has init param {1} but it is deprecated. It should be replaced by {2}. J4P_000044=J4P000044: Using {0} as view root for portlet {1} +J4P_000045=J4P000045: Injection method {0} should not be declared 'static' for annotation {1}. +J4P_000046=J4P000046: Return type of injection method {0} should be 'void' for annotation {1}. +J4P_000047=J4P000047: Injection method {0} should be declared with no parameters for annotation {1}. +J4P_000048=J4P000048: Injection method {0} should thrown no checked exceptions for annotation {1}. +J4P_000049=J4P000049: Cannot read injection provider service. Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets-ext/pom.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -12,6 +12,11 @@ <name>JSF 4 Portlets Extensions</name> + <description> + This is the extensions module of JSF 4 Portlets. This module brings some + additional features to the bridge implementation like Facelets support and more. + </description> + <dependencies> <dependency> <groupId>javax.el</groupId> @@ -47,10 +52,7 @@ <groupId>net.sf.jsf4portlets</groupId> <artifactId>jsf4portlets</artifactId> </dependency> - <dependency> - <groupId>org.ajax4jsf</groupId> - <artifactId>ajax4jsf</artifactId> - </dependency> + <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> @@ -76,10 +78,6 @@ <groupId>net.sourceforge.maven-taglib</groupId> <artifactId>maven-taglib-plugin</artifactId> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-changelog-plugin</artifactId> - </plugin> </plugins> </reporting> Modified: trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml =================================================================== --- trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -27,32 +27,4 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" version="1.2"> - <lifecycle> - <phase-listener> - net.sf.jsf4portlets.ajax.AjaxPortletLifecycleListener - </phase-listener> - </lifecycle> - - <managed-bean> - <managed-bean-name>ajaxContext</managed-bean-name> - <managed-bean-class> - net.sf.jsf4portlets.ajax.AjaxPortletContext - </managed-bean-class> - <managed-bean-scope>request</managed-bean-scope> - </managed-bean> - - <render-kit> - <renderer> - <component-family> - javax.faces.ViewRoot - </component-family> - <renderer-type> - javax.faces.ViewRoot - </renderer-type> - <renderer-class> - net.sf.jsf4portlets.ajax.AjaxPortletViewRootRenderer - </renderer-class> - </renderer> - </render-kit> - </faces-config> \ No newline at end of file Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/pom.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -119,10 +119,10 @@ <groupId>net.sourceforge.maven-taglib</groupId> <artifactId>maven-taglib-plugin</artifactId> </plugin> - <plugin> + <!--<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> - </plugin> + </plugin>--> </plugins> </reporting> @@ -191,9 +191,9 @@ </dependency> <dependency> - <groupId>org.ajax4jsf</groupId> - <artifactId>ajax4jsf</artifactId> - <version>1.1.1</version> + <groupId>org.apache.tomcat</groupId> + <artifactId>catalina</artifactId> + <version>6.0.13</version> <scope>compile</scope> <optional>true</optional> </dependency> Modified: trunk/src/assembly/bin.xml =================================================================== --- trunk/src/assembly/bin.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/src/assembly/bin.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -38,11 +38,14 @@ <binaries> <outputDirectory>/lib</outputDirectory> <unpack>false</unpack> - <includeDependecies>false</includeDependencies> <dependencySets> <dependencySet> <outputDirectory>/lib</outputDirectory> <scope>runtime</scope> + <excludes> + <exclude>org.apache.tomcat:*</exclude> + <exclude>com.sun.facelets:*</exclude> + </excludes> </dependencySet> </dependencySets> </binaries> @@ -57,6 +60,10 @@ </includes> </fileSet> <fileSet> + <directory>src/legal</directory> + <outputDirectory>/lib</outputDirectory> + </fileSet> + <fileSet> <directory>target</directory> <outputDirectory>/</outputDirectory> <includes> @@ -65,14 +72,14 @@ </fileSet> <fileSet> <directory>target/site/apidocs</directory> - <outputDirectory>/apidocs</outputDirectory> + <outputDirectory>/doc/apidocs</outputDirectory> <includes> <include>**/*</include> </includes> </fileSet> <fileSet> <directory>target/site/tlddoc</directory> - <outputDirectory>/tlddocs</outputDirectory> + <outputDirectory>/doc/tlddocs</outputDirectory> <includes> <include>**/*</include> </includes> Copied: trunk/src/legal (from rev 28, trunk/jsf4portlets/src/legal) Copied: trunk/src/site (from rev 28, trunk/jsf4portlets/src/site) Modified: trunk/src/site/apt/download.apt =================================================================== --- trunk/jsf4portlets/src/site/apt/download.apt 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/src/site/apt/download.apt 2007-09-26 17:47:31 UTC (rev 29) @@ -1,3 +1,25 @@ +~~ +~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +~~ Copyright (C) 2007 A. Alonso Dominguez +~~ +~~ This library 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 library 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 library; if not, write to the Free Software +~~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +~~ +~~ A. Alonso Dominguez +~~ alo...@us... +~~ + --- Download JSF 4 Portlets --- @@ -8,11 +30,37 @@ Downloads for JSF 4 Portlets are served by {{{http://www.sourceforge.net}SourceForge.net}}, you can access the global project downloads through the following link {{http://sourceforge.net/project/showfiles.php?group_id=196120}}. -* Current Release : 1.0-alpha-1 +* Current Release : 1.0-alpha-2 + Implements JSR-301 Early Draft 2 + ** Binary Distributions *----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Windows (*.zip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-2-bin.zip?modtime=1180909157&big_mirror=0}jsf4portlets-1.0-alpha-2-bin.zip}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (gzip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-2-bin.tar.gz?modtime=1180909046&big_mirror=0}jsf4portlets-1.0-alpha-2-bin.tar.gz}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (bzip2) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-2-bin.tar.bz2?modtime=1180909014&big_mirror=0}jsf4portlets-1.0-alpha-2-bin.tar.bz2}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +** Source Distributions + +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Windows (*.zip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-2-src.zip?modtime=1180909373&big_mirror=0}jsf4portlets-1.0-alpha-2-src.zip}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (gzip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-2-src.tar.gz?modtime=1180909345&big_mirror=0}jsf4portlets-1.0-alpha-2-src.tar.gz}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Unix (bzip2) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-2-src.tar.bz2?modtime=1180909325&big_mirror=0}jsf4portlets-1.0-alpha-2-src.tar.bz2}} | +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +* Older release : 1.0-alpha-1 + + Implements JSR-301 Early Draft 1 + +** Binary Distributions + +*----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ Windows (*.zip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-bin.zip?modtime=1180909157&big_mirror=0}jsf4portlets-1.0-alpha-1-bin.zip}} | *----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ Unix (gzip) | {{{http://downloads.sourceforge.net/jsf4portlets/jsf4portlets-1.0-alpha-1-bin.tar.gz?modtime=1180909046&big_mirror=0}jsf4portlets-1.0-alpha-1-bin.tar.gz}} | Modified: trunk/src/site/apt/release_notes.apt =================================================================== --- trunk/jsf4portlets/src/site/apt/release_notes.apt 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/src/site/apt/release_notes.apt 2007-09-26 17:47:31 UTC (rev 29) @@ -1 +1,23 @@ +~~ +~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +~~ Copyright (C) 2007 A. Alonso Dominguez +~~ +~~ This library 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 library 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 library; if not, write to the Free Software +~~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +~~ +~~ A. Alonso Dominguez +~~ alo...@us... +~~ + JSF 4 Portlets - Release Notes Modified: trunk/src/site/apt/user_docs.apt =================================================================== --- trunk/jsf4portlets/src/site/apt/user_docs.apt 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/src/site/apt/user_docs.apt 2007-09-26 17:47:31 UTC (rev 29) @@ -1,3 +1,25 @@ +~~ +~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +~~ Copyright (C) 2007 A. Alonso Dominguez +~~ +~~ This library 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 library 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 library; if not, write to the Free Software +~~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +~~ +~~ A. Alonso Dominguez +~~ alo...@us... +~~ + --- Using JSF 4 Portlets --- @@ -48,6 +70,8 @@ </context-param> +--- + This context init parameter is useful when we have more than one implementation of the JSF Portlet Bridge in the classpath, so we need to specify which of the current implementations of the Bridge interface must be used by our portlets. + ** Basic Portlet Configuration So, the last work is to configure the <<<javax.portlet.faces.GenericFacesPortlet>>>. This portlet will delegate all work to the bridge implementation. This portlet needs at least one init parameter so it can know the default <<<viewId>>> to be rendered when no <<<viewId>>> has been requested. Following there is an example: @@ -77,6 +101,7 @@ ** Bridge Parameters JSF portlets have the ability to preserve its action parameters during the render phase and to perform redirects againts the portal. This two features are disabled by default so they must be configured so portlets can take advantage of them. + If you want to configure this two features to every portlet in the same web application you must set the following in your <<<WEB-INF/web.xml>>> file. You can also specify these parameters in the <<<WEB-INF/portlet.xml>>> file as portlet init parameters. *** Performing redirects againts the portal page: @@ -90,17 +115,60 @@ *** Preserving action parameters + This attribute is used when we need access the portlet parameters which caused the current view to be rendered during the render phase. This parameters can be accessed using EL expressions like <<<#\{param.[param_name]\}>>>. + +--- <context-param> - <param-name>javax.portlet.faces.PRESERVE_ACTION_PARAMS</param-name> + <param-name>javax.portlet.faces.preserveActionParams</param-name> <param-value>true</param-value> </context-param> +--- +** Portlet Render Policy + + This is a special feature of the JSF Portlet Bridge. The render policy stablishes if the bridge should delegate rendering to parent view handlers. Delegation of the render operation depends of 3 different possible values: + + [DEFAULT] Renders the current view delegating the render operation to the parent <<<ViewHandler>>>. If this operation throws any exception, then the bridge will try to render the output by itself. + + [ALWAYS_DELEGATE] Always delegate the render operation to the parent <<<ViewHandler>>>. If this operation throws any exception, it should be caught by the <<<GenericFacesPortlet>>> and rethrown as a <<<PortletException>>>. + + [NEVER_DELEGATE] Never delegate the render operation to the parent <<<ViewHandler>>>. The bridge will always try to render the current view by itself. + + The default behaivour is <<<DEFAULT>>>, if we need to change this, we must stablish a portlet init parameter like below: + ++--- +<portlet> + ... + + <init-param> + <name>javax.portlet.faces.renderPolicy</name> + <value>NEVER_DELEGATE</value> + </init-param> + + ... +</portlet> ++--- + + This feature allows retaining the natural order of non-Faces and Faces output when both exists in the same JSP file. Because JSR-168 doesn't allows request/response wrapping, we need to configure a servlet filter around the Faces' servlet like following: + ++--- +<filter> + <filter-name>Faces Portlet Render Filter</filter-name> + <filter-class>javax.portlet.faces.BridgeRenderFilter</filter-class> +</filter> + +<filter-mapping> + <filter-name>Faces Portlet Render Filter</filter-name> + <servlet-name>FacesServlet</servlet-name> + <dispatcher>INCLUDE</dispatcher> +</filter-mapping> ++--- + ** Portlet Modes - JSF 4 Porlets supports portlets with 3 different portlet modes: <<<VIEW>>>, <<<EDIT>>> and <<<HELP>>>, in the future custom portlet modes will also be supported. Every portlet needs to configure the <<<VIEW>>> mode as the default, <<<EDIT>>> and <<<HELP>>> modes are optional. - Each portlet mode has a corresponding portlet init parameter so portlet can stablish the default viewId for the current portlet mode: + JSF 4 Porlets supports portlets with standard portlet modes (<<<VIEW>>>, <<<EDIT>>> and <<<HELP>>>) and custom portlet modes. Every portlet needs to configure the <<<VIEW>>> mode as the default, <<<EDIT>>> and <<<HELP>>> modes are optional. Custom portlet modes must be defined in <<<portlet.xml>>> to become available. + + Each portlet mode has a corresponding portlet init parameter so portlet can stablish the default viewId for the current portlet mode. When a portlet receives a PortletRequest for portlet mode which has not been configured, a <<<BridgeDefaultViewNotSpecifiedException>>> is thrown. *** View @@ -124,7 +192,16 @@ +--- <init-param> - <name>javax.portlet.faces.defaultViewId</name> + <name>javax.portlet.faces.defaultViewId.help</name> <value>/help.jsf</value> </init-param> +--- + +*** Custom Portlet Modes + ++--- +<init-param> + <name>javax.portlet.faces.defaultViewId.[custom_portlet_mode]</name> + <value>/custom.jsf</value> +</init-param> ++--- \ No newline at end of file Modified: trunk/src/site/site.xml =================================================================== --- trunk/jsf4portlets/src/site/site.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/src/site/site.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -50,9 +50,10 @@ <menu name="Documentation"> <item name="User Documentation" href="user_docs.html" /> <item name="Java Docs" href="apidocs/index.html" /> - <item name="Taglib Docs" href="tlddoc/index.html" /> </menu> + <menu ref="modules" /> + <menu ref="reports" /> </body> </project> Modified: trunk/src/site/xdoc/getting_started.xml =================================================================== --- trunk/jsf4portlets/src/site/xdoc/getting_started.xml 2007-09-06 17:28:35 UTC (rev 28) +++ trunk/src/site/xdoc/getting_started.xml 2007-09-26 17:47:31 UTC (rev 29) @@ -36,7 +36,7 @@ <p>Copy distributed libraries into directory <tt>[TOMCAT_HOME]/lib</tt>. The result must to be like following:</p> <source><![CDATA[ [TOMCAT_HOME]/lib/... -[TOMCAT_HOME]/lib/jsf4portlets-1.0-alpha-1.jar +[TOMCAT_HOME]/lib/jsf4portlets-1.0-alpha-2.jar [TOMCAT_HOME]/lib/commons-digester-1.8.jar [TOMCAT_HOME]/lib/commons-beanutils-1.7.0.jar [TOMCAT_HOME]/lib/commons-logging-1.1.jar @@ -49,7 +49,7 @@ <p>Copy distributed libraries into <tt>/lib</tt> directory inside the domain tree. The result must be like the following.</p> <source><![CDATA[ [DOMAIN_HOME]/lib/... -[DOMAIN_HOME]/lib/jsf4portlets-1.0-alpha-1.jar +[DOMAIN_HOME]/lib/jsf4portlets-1.0-alpha-2.jar [DOMAIN_HOME]/lib/commons-digester-1.8.jar [DOMAIN_HOME]/lib/commons-beanutils-1.7.0.jar [DOMAIN_HOME]/lib/commons-logging-1.1.jar @@ -69,7 +69,7 @@ <context-param> <param-name> - javax.portlet.faces.extension.bridgeClass + javax.portlet.faces.BridgeClassName </param-name> <param-value> net.sf.jsf4portlets.BridgeImpl @@ -86,7 +86,7 @@ ... <init-param> <name> - javax.portlet.faces.extension.bridgeClass + javax.portlet.faces.BridgeClassName </name> <value> net.sf.jsf4portlets.BridgeImpl @@ -117,7 +117,7 @@ ]]></source> </subsection> <subsection name="JSF Portlet configuration"> - <p>JSF 4 Portlet requires at least one parameter to be configured in <tt>portlet.xml</tt> for each portlet. This parameter is <tt>javax.portlet.faces.extension.INIT_VIEW</tt> and it's needed to know the first view to be rendered when no viewId has been requested.</p> + <p>JSF 4 Portlet requires at least one parameter to be configured in <tt>portlet.xml</tt> for each portlet. This parameter is <code>javax.portlet.faces.defaultViewId.view</code> and it's needed to know the first view to be rendered when no viewId has been requested.</p> <source><![CDATA[ <portlet-app ...> @@ -128,7 +128,7 @@ </portlet-class> <init-param> - <name>javax.portlet.faces.extension.INIT_VIEW</name> + <name>javax.portlet.faces.defaultViewId.view</name> <value>/path/to/viewId</value> </init-param> </portlet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-09-27 17:32:05
|
Revision: 30 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=30&view=rev Author: alonsoft Date: 2007-09-27 10:32:02 -0700 (Thu, 27 Sep 2007) Log Message: ----------- Prepared for alpha-2 release Modified Paths: -------------- trunk/jsf4portlets/pom.xml trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties trunk/pom.xml trunk/src/assembly/bin.xml trunk/src/assembly/src.xml trunk/src/site/site.xml Added Paths: ----------- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java trunk/jsf4portlets/src/site/ trunk/jsf4portlets/src/site/site.xml trunk/jsf4portlets-ext/src/site/ trunk/jsf4portlets-ext/src/site/apt/ trunk/jsf4portlets-ext/src/site/apt/facelets.apt trunk/jsf4portlets-ext/src/site/apt/index.apt trunk/jsf4portlets-ext/src/site/site.xml trunk/src/site/apt/repositories.apt Modified: trunk/jsf4portlets/pom.xml =================================================================== --- trunk/jsf4portlets/pom.xml 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/jsf4portlets/pom.xml 2007-09-27 17:32:02 UTC (rev 30) @@ -52,6 +52,10 @@ <groupId>org.apache.tomcat</groupId> <artifactId>catalina</artifactId> </dependency> + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-plus</artifactId> + </dependency> <dependency> <groupId>junit</groupId> Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java 2007-09-27 17:32:02 UTC (rev 30) @@ -127,7 +127,7 @@ try { Class<?> clazz = Class.forName(className, true, InjectionProviderFactory.class.getClassLoader()); - if(clazz.isAssignableFrom(InjectionProvider.class)) { + if(InjectionProvider.class.isAssignableFrom(clazz)) { try { Constructor<?> cons = clazz.getConstructor(PortletContext.class); provider = (InjectionProvider) cons.newInstance( @@ -177,7 +177,9 @@ String[] parts = entry.split(":"); if(parts.length != 2) { - // TODO log about this problem + if(logger.isLoggable(Level.SEVERE)) { + logger.log(Level.SEVERE, "J4P_000050", entry); + } return null; } @@ -188,11 +190,15 @@ return parts[0]; } } else { - // TODO Entry not discoverable + if(logger.isLoggable(Level.SEVERE)) { + logger.log(Level.SEVERE, "J4P_000051", parts[0]); + } return null; } } catch(ClassNotFoundException e) { - // TODO provider not found + if(logger.isLoggable(Level.SEVERE)) { + logger.log(Level.SEVERE, "J4P_000034", parts[0]); + } return null; } Added: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java (rev 0) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java 2007-09-27 17:32:02 UTC (rev 30) @@ -0,0 +1,45 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.vendor; + +import net.sf.jsf4portlets.spi.ContainerInjectionProvider; +import net.sf.jsf4portlets.spi.InjectionProviderException; + +import org.mortbay.jetty.plus.annotation.LifeCycleCallbackCollection; + +public class Jetty6InjectionProvider extends ContainerInjectionProvider { + + private LifeCycleCallbackCollection callbacks; + + public Jetty6InjectionProvider() { + callbacks = new LifeCycleCallbackCollection(); + } + + public void invokePreDestroy(Object managedBean) + throws InjectionProviderException { + try { + callbacks.callPreDestroyCallback(managedBean); + } catch(Exception e) { + throw new InjectionProviderException(e); + } + } + +} Modified: trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider 2007-09-27 17:32:02 UTC (rev 30) @@ -1 +1,2 @@ -net.sf.jsf4portlets.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor \ No newline at end of file +net.sf.jsf4portlets.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor +net.sf.jsf4portlets.vendor.Jetty6InjectionProvider:org.mortbay.jetty.annotation.LifeCycleCallbackCollection \ No newline at end of file Modified: trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties =================================================================== --- trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/jsf4portlets/src/main/resources/net/sf/jsf4portlets/LogMessages.properties 2007-09-27 17:32:02 UTC (rev 30) @@ -67,3 +67,5 @@ J4P_000047=J4P000047: Injection method {0} should be declared with no parameters for annotation {1}. J4P_000048=J4P000048: Injection method {0} should thrown no checked exceptions for annotation {1}. J4P_000049=J4P000049: Cannot read injection provider service. +J4P_000050=J4P000050: Illegal injection provider service entry: {0} +J4P_000051=J4P000051: Entry {0} is not a container specific injection provider. Added: trunk/jsf4portlets/src/site/site.xml =================================================================== --- trunk/jsf4portlets/src/site/site.xml (rev 0) +++ trunk/jsf4portlets/src/site/site.xml 2007-09-27 17:32:02 UTC (rev 30) @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2007 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + +<project name="JSF 4 Portlets Core"> + <bannerLeft> + <name>SourceForge.net Logo</name> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=196120&type=5</src> + <href>http://www.sourceforge.net</href> + </bannerLeft> + <bannerRight> + <name>JSF 4 Portlets</name> + <href>http://jsf4portlets.sf.net</href> + </bannerRight> + + <body> + <links> + <item name="JSF 4 Portlets" href="http://jsf4portlets.sf.net" /> + <item name="SF Project Page" href="http://sf.net/projects/jsf4portlets" /> + <item name="JSR-301" href="http://jcp.org/en/jsr/detail?id=301" /> + </links> + + <menu name="Main Menu"> + <item name="Overview" href="index.html" /> + <item name="License" href="license.html" /> + </menu> + + <menu ref="reports" /> + </body> +</project> \ No newline at end of file Added: trunk/jsf4portlets-ext/src/site/apt/facelets.apt =================================================================== --- trunk/jsf4portlets-ext/src/site/apt/facelets.apt (rev 0) +++ trunk/jsf4portlets-ext/src/site/apt/facelets.apt 2007-09-27 17:32:02 UTC (rev 30) @@ -0,0 +1,45 @@ +~~ +~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +~~ Copyright (C) 2007 A. Alonso Dominguez +~~ +~~ This library 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 library 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 library; if not, write to the Free Software +~~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +~~ +~~ A. Alonso Dominguez +~~ alo...@us... +~~ + + --- + JSF 4 Portlets Extensions - Facelets + --- + A. Alonso Dom\xEDnguez + --- + +Facelets Support + + If you would like to use {{{http://facelets.dev.java.net}JSF Facelets}} you must configure the <<<FaceletPortletViewHandler>>> in your <<<faces-config.xml>>> like following: + ++--- +<faces-config> + ... + + <application> + <view-handler> + net.sf.jsf4portlets.facelets.FaceletPortletViewHandler + </view-handler> + </application> + + ... +</faces-config> ++--- \ No newline at end of file Added: trunk/jsf4portlets-ext/src/site/apt/index.apt =================================================================== --- trunk/jsf4portlets-ext/src/site/apt/index.apt (rev 0) +++ trunk/jsf4portlets-ext/src/site/apt/index.apt 2007-09-27 17:32:02 UTC (rev 30) @@ -0,0 +1,38 @@ +~~ +~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +~~ Copyright (C) 2007 A. Alonso Dominguez +~~ +~~ This library 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 library 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 library; if not, write to the Free Software +~~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +~~ +~~ A. Alonso Dominguez +~~ alo...@us... +~~ + + --- + JSF 4 Portlets Extensions + --- + A. Alonso Dom\xEDnguez + --- + + +JSF 4 Portlets Extensions + + This is the extensions module of JSF 4 Portlets. This module brings some additional features to the bridge implementation. Currently the only extension available is support for {{{http://facelets.dev.java.net}JSF Facelets}}, more features will be implemented in the future. + + Planned features: + + * Inter-Portlet Communication. This will require deploying portlets with the {{{http://portlet-container.dev.java.net}Open Source Portlet Container}}. This feature will allow Faces' managed beans to be aware of portlet events. + + * AJAX Support. \ No newline at end of file Added: trunk/jsf4portlets-ext/src/site/site.xml =================================================================== --- trunk/jsf4portlets-ext/src/site/site.xml (rev 0) +++ trunk/jsf4portlets-ext/src/site/site.xml 2007-09-27 17:32:02 UTC (rev 30) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2007 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + +<project name="JSF 4 Portlets Extensions"> + <bannerLeft> + <name>SourceForge.net Logo</name> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=196120&type=5</src> + <href>http://www.sourceforge.net</href> + </bannerLeft> + <bannerRight> + <name>JSF 4 Portlets</name> + <href>http://jsf4portlets.sf.net</href> + </bannerRight> + + <body> + <links> + <item name="JSF 4 Portlets" href="http://jsf4portlets.sf.net" /> + <item name="SF Project Page" href="http://sf.net/projects/jsf4portlets" /> + <item name="JSR-301" href="http://jcp.org/en/jsr/detail?id=301" /> + </links> + + <menu name="Main Menu"> + <item name="Overview" href="index.html" /> + <item name="License" href="license.html" /> + </menu> + + <menu name="Feature Documentation"> + <item name="Facelets" href="facelets.html" /> + </menu> + + <menu ref="reports" /> + </body> +</project> \ No newline at end of file Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/pom.xml 2007-09-27 17:32:02 UTC (rev 30) @@ -79,6 +79,7 @@ </modules> <build> + <defaultGoal>install</defaultGoal> <pluginManagement> <plugins> <plugin> @@ -199,6 +200,28 @@ </dependency> <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-plus</artifactId> + <version>6.1.2</version> + <scope>compile</scope> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + </exclusion> + <exclusion> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + </exclusion> + <exclusion> + <groupId>geronimo-spec</groupId> + <artifactId>geronimo-spec-jta</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> <version>1.1.11</version> Modified: trunk/src/assembly/bin.xml =================================================================== --- trunk/src/assembly/bin.xml 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/src/assembly/bin.xml 2007-09-27 17:32:02 UTC (rev 30) @@ -32,23 +32,31 @@ <moduleSets> <moduleSet> <includes> - <include>net.sf.jsf4portlets:jsf4portlets</include> - <include>net.sf.jsf4portlets:jsf4portlets-ext</include> + <include>net.sf.jsf4portlets:*</include> </includes> <binaries> - <outputDirectory>/lib</outputDirectory> + <outputDirectory>/</outputDirectory> <unpack>false</unpack> <dependencySets> <dependencySet> <outputDirectory>/lib</outputDirectory> - <scope>runtime</scope> <excludes> + <exclude>net.sf.jsf4portlets:jsf4portlets</exclude> <exclude>org.apache.tomcat:*</exclude> - <exclude>com.sun.facelets:*</exclude> + <exclude>org.mortbay.jetty:jetty-plus</exclude> </excludes> </dependencySet> </dependencySets> </binaries> + <sources> + <includeModuleDirectory>true</includeModuleDirectory> + <outputDirectoryMapping>/doc/${artifactId}</outputDirectoryMapping> + <fileSets> + <fileSet> + <directory>target/site</directory> + </fileSet> + </fileSets> + </sources> </moduleSet> </moduleSets> <fileSets> @@ -64,25 +72,8 @@ <outputDirectory>/lib</outputDirectory> </fileSet> <fileSet> - <directory>target</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>*.jar</include> - </includes> + <directory>target/site</directory> + <outputDirectory>/doc</outputDirectory> </fileSet> - <fileSet> - <directory>target/site/apidocs</directory> - <outputDirectory>/doc/apidocs</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - <fileSet> - <directory>target/site/tlddoc</directory> - <outputDirectory>/doc/tlddocs</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> </fileSets> </assembly> \ No newline at end of file Modified: trunk/src/assembly/src.xml =================================================================== --- trunk/src/assembly/src.xml 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/src/assembly/src.xml 2007-09-27 17:32:02 UTC (rev 30) @@ -29,6 +29,27 @@ <format>tar.bz2</format> <format>zip</format> </formats> + <moduleSets> + <moduleSet> + <includes> + <include>net.sf.jsf4portlets:jsf4portlets</include> + <include>net.sf.jsf4portlets:jsf4portlets-ext</include> + </includes> + <sources> + <fileSets> + <fileSet> + <directory>src</directory> + <outputDirectory>src</outputDirectory> + </fileSet> + <fileSet> + <includes> + <include>pom.xml</include> + </includes> + </fileSet> + </fileSets> + </sources> + </moduleSet> + </moduleSets> <fileSets> <fileSet> <includes> @@ -41,9 +62,6 @@ <fileSet> <directory>src</directory> <outputDirectory>/src</outputDirectory> - <includes> - <include>**/*</include> - </includes> </fileSet> </fileSets> </assembly> \ No newline at end of file Added: trunk/src/site/apt/repositories.apt =================================================================== --- trunk/src/site/apt/repositories.apt (rev 0) +++ trunk/src/site/apt/repositories.apt 2007-09-27 17:32:02 UTC (rev 30) @@ -0,0 +1,61 @@ +~~ +~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +~~ Copyright (C) 2007 A. Alonso Dominguez +~~ +~~ This library 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 library 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 library; if not, write to the Free Software +~~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +~~ +~~ A. Alonso Dominguez +~~ alo...@us... +~~ + + --- + JSF 4 Portlets - Repositories + --- + A. Alonso Dom\xEDnguez + --- + +Maven 2 Repositories + + JSF 4 Portlets is not available at the maven2 central repository because some dependency issues, it will be available in the future when that issues become resolved. Ragard of this, it is possible to use jsf4portlets with a Maven2 project configuring the specific repositories for JSF 4 Portlets at {{{http://www.sourceforge.net}SourceForge.net}}: + + * <<Releases>>: {{http://jsf4portlets.sf.net/repository/releases}} + + * <<Snapshots>>: {{http://jsf4portlets.sf.net/repository/snapshots}} + + Following is an example of how to configure these maven 2 repositories for your project. + +* Releases + ++--- +<repositories> + <repository> + <id>releases.jsf4portlets</id> + <url>http://jsf4portlets.sf.net/repository/releases</url> + <layout>default</layout> + </repository> +</repositories> ++--- + +* Snapshots + ++--- +<repositories> + <repository> + <id>snapshots.jsf4portlets</id> + <url>http://jsf4portlets.sf.net/repository/snapshots</url> + <layout>default</layout> + </repository> +</repositories> ++--- \ No newline at end of file Modified: trunk/src/site/site.xml =================================================================== --- trunk/src/site/site.xml 2007-09-26 17:47:31 UTC (rev 29) +++ trunk/src/site/site.xml 2007-09-27 17:32:02 UTC (rev 30) @@ -33,6 +33,11 @@ <href>http://jsf4portlets.sf.net</href> </bannerRight> + <poweredBy> + <logo name="Maven" href="http://maven.apache.org/" + img="http://maven.apache.org/images/logos/maven-feather.png"/> + </poweredBy> + <body> <links> <item name="SF Project Page" href="http://sf.net/projects/jsf4portlets" /> @@ -49,9 +54,13 @@ <menu name="Documentation"> <item name="User Documentation" href="user_docs.html" /> - <item name="Java Docs" href="apidocs/index.html" /> + <item name="Java Docs" href="jsf4portlets/apidocs/index.html" /> </menu> + <menu name="Developer Documentation"> + <item name="Maven 2 Repositories" href="repositories.html" /> + </menu> + <menu ref="modules" /> <menu ref="reports" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-09-27 17:43:56
|
Revision: 31 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=31&view=rev Author: alonsoft Date: 2007-09-27 10:43:53 -0700 (Thu, 27 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare release jsf4portlets-project-1.0-alpha-2 Modified Paths: -------------- trunk/jsf4portlets/pom.xml trunk/jsf4portlets-ext/pom.xml trunk/pom.xml Modified: trunk/jsf4portlets/pom.xml =================================================================== --- trunk/jsf4portlets/pom.xml 2007-09-27 17:32:02 UTC (rev 30) +++ trunk/jsf4portlets/pom.xml 2007-09-27 17:43:53 UTC (rev 31) @@ -1,54 +1,54 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>net.sf.jsf4portlets</groupId> - <artifactId>jsf4portlets-project</artifactId> - <version>1.0-alpha-2-SNAPSHOT</version> - </parent> - - <artifactId>jsf4portlets</artifactId> - <packaging>jar</packaging> - - <name>JSF 4 Portlets Core</name> - - <description> - This is the main module of JSF 4 Portlets. This module brings an implementation of - the JSF Portlet Bridge (JSR-301) which allows JSR-168 Portlets running as JSF applications. - </description> - - <dependencies> - <dependency> - <groupId>javax.el</groupId> - <artifactId>el-api</artifactId> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - </dependency> - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - </dependency> - <dependency> - <groupId>javax.portlet</groupId> - <artifactId>portlet-api</artifactId> - </dependency> - - <dependency> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - </dependency> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets-project</artifactId> + <version>1.0-alpha-2</version> + </parent> + + <artifactId>jsf4portlets</artifactId> + <packaging>jar</packaging> + + <name>JSF 4 Portlets Core</name> + + <description> + This is the main module of JSF 4 Portlets. This module brings an implementation of + the JSF Portlet Bridge (JSR-301) which allows JSR-168 Portlets running as JSF applications. + </description> + + <dependencies> + <dependency> + <groupId>javax.el</groupId> + <artifactId>el-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>jsr250-api</artifactId> + </dependency> + <dependency> + <groupId>javax.portlet</groupId> + <artifactId>portlet-api</artifactId> + </dependency> <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + </dependency> + + <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>catalina</artifactId> </dependency> @@ -56,31 +56,31 @@ <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-plus</artifactId> </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </dependency> - </dependencies> - - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-project-info-reports-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - </plugin> - <plugin> - <groupId>net.sourceforge.maven-taglib</groupId> - <artifactId>maven-taglib-plugin</artifactId> - </plugin> - </plugins> - </reporting> - - <build> - </build> - -</project> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + </dependencies> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <build> + </build> + +</project> \ No newline at end of file Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2007-09-27 17:32:02 UTC (rev 30) +++ trunk/jsf4portlets-ext/pom.xml 2007-09-27 17:43:53 UTC (rev 31) @@ -1,87 +1,87 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>net.sf.jsf4portlets</groupId> - <artifactId>jsf4portlets-project</artifactId> - <version>1.0-alpha-2-SNAPSHOT</version> - </parent> - - <artifactId>jsf4portlets-ext</artifactId> - <packaging>jar</packaging> - - <name>JSF 4 Portlets Extensions</name> - - <description> - This is the extensions module of JSF 4 Portlets. This module brings some - additional features to the bridge implementation like Facelets support and more. - </description> - - <dependencies> - <dependency> - <groupId>javax.el</groupId> - <artifactId>el-api</artifactId> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - </dependency> - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - </dependency> - <dependency> - <groupId>javax.portlet</groupId> - <artifactId>portlet-api</artifactId> - </dependency> - - <dependency> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - </dependency> - - <dependency> - <groupId>net.sf.jsf4portlets</groupId> - <artifactId>jsf4portlets</artifactId> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets-project</artifactId> + <version>1.0-alpha-2</version> + </parent> + + <artifactId>jsf4portlets-ext</artifactId> + <packaging>jar</packaging> + + <name>JSF 4 Portlets Extensions</name> + + <description> + This is the extensions module of JSF 4 Portlets. This module brings some + additional features to the bridge implementation like Facelets support and more. + </description> + + <dependencies> + <dependency> + <groupId>javax.el</groupId> + <artifactId>el-api</artifactId> </dependency> - - <dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>jsr250-api</artifactId> + </dependency> + <dependency> + <groupId>javax.portlet</groupId> + <artifactId>portlet-api</artifactId> + </dependency> + + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + </dependency> + + <dependency> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets</artifactId> + </dependency> + + <dependency> <groupId>com.sun.facelets</groupId> - <artifactId>jsf-facelets</artifactId> + <artifactId>jsf-facelets</artifactId> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - </dependency> - </dependencies> - - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-project-info-reports-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - </plugin> - <plugin> - <groupId>net.sourceforge.maven-taglib</groupId> - <artifactId>maven-taglib-plugin</artifactId> - </plugin> - </plugins> - </reporting> - - <build> - </build> - -</project> + </dependency> + </dependencies> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <build> + </build> + +</project> \ No newline at end of file Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-09-27 17:32:02 UTC (rev 30) +++ trunk/pom.xml 2007-09-27 17:43:53 UTC (rev 31) @@ -1,248 +1,248 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>net.sf.jsf4portlets</groupId> - <artifactId>jsf4portlets-project</artifactId> - <version>1.0-alpha-2-SNAPSHOT</version> - - <packaging>pom</packaging> - - <name>JSF 4 Portlets</name> - <url>http://jsf4portlets.sf.net/</url> - - <scm> - <connection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/trunk</connection> - <developerConnection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/trunk</developerConnection> - <url>http://jsf4portlets.svn.sourceforge.net/viewvc/jsf4portlets/trunk</url> - </scm> - - <description> - JSF 4 Portlets is an implementation of the JSR-301 (JSF Portlet Bridge). - </description> - - <licenses> - <license> - <name>Lesser General Public License</name> - <url>http://www.opensource.org/licenses/lgpl-license.php</url> - </license> - </licenses> - - <developers> - <developer> - <id>alonso</id> - <name>A. Alonso Dominguez</name> - <email>alo...@us...</email> - <roles> - <role>Developer</role> - </roles> - <timezone>-1</timezone> - </developer> - </developers> - - <mailingLists> - <mailingList> - <name>Developer Mailing List</name> - <subscribe>jsf...@li...</subscribe> - <unsubscribe>jsf...@li...</unsubscribe> - </mailingList> - </mailingLists> - - <issueManagement> - <system>SourceForge.net</system> - <url>http://sourceforge.net/tracker/?group_id=196120</url> - </issueManagement> - - <distributionManagement> - <site> - <id>shell.sf.net</id> - <name>JSF 4 Portlets Website</name> - <url>scp://shell.sf.net/home/groups/j/js/jsf4portlets/htdocs/web</url> - </site> - <repository> - <id>shell.sf.net</id> - <name>JSF 4 Portlets Release Repository</name> - <url>scp://shell.sf.net/home/groups/j/js/jsf4portlets/htdocs/repository/releases</url> - <uniqueVersion>false</uniqueVersion> - </repository> - <snapshotRepository> - <id>shell.sf.net</id> - <name>JSF 4 Portlets Snapshot Repository</name> - <url>scp://shell.sf.net/home/groups/j/js/jsf4portlets/htdocs/repository/snapshots</url> - <uniqueVersion>true</uniqueVersion> - <layout>default</layout> - </snapshotRepository> - </distributionManagement> - - <modules> - <module>jsf4portlets</module> - <module>jsf4portlets-ext</module> - </modules> - - <build> - <defaultGoal>install</defaultGoal> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - </plugins> - </pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <descriptors> - <descriptor>src/assembly/bin.xml</descriptor> - <descriptor>src/assembly/src.xml</descriptor> - </descriptors> - </configuration> - </plugin> - </plugins> - </build> - - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-project-info-reports-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - </plugin> - <plugin> - <groupId>net.sourceforge.maven-taglib</groupId> - <artifactId>maven-taglib-plugin</artifactId> - </plugin> - <!--<plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-changelog-plugin</artifactId> - </plugin>--> - </plugins> - </reporting> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>javax.el</groupId> - <artifactId>el-api</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <version>2.1</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - <version>1.2</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.portlet</groupId> - <artifactId>portlet-api</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - <version>1.8</version> - <scope>compile</scope> - <exclusions> - <exclusion> - <artifactId>avalon-framework</artifactId> - <groupId>avalon-framework</groupId> - </exclusion> - <exclusion> - <artifactId>log4j</artifactId> - <groupId>log4j</groupId> - </exclusion> - <exclusion> - <artifactId>logkit</artifactId> - <groupId>logkit</groupId> - </exclusion> - <exclusion> - <artifactId>servlet-api</artifactId> - <groupId>javax.servlet</groupId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.tomcat</groupId> - <artifactId>catalina</artifactId> - <version>6.0.13</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jetty-plus</artifactId> - <version>6.1.2</version> - <scope>compile</scope> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>javax.activation</groupId> - <artifactId>activation</artifactId> - </exclusion> - <exclusion> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - </exclusion> - <exclusion> - <groupId>geronimo-spec</groupId> - <artifactId>geronimo-spec-jta</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>com.sun.facelets</groupId> - <artifactId>jsf-facelets</artifactId> - <version>1.1.11</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>net.sf.jsf4portlets</groupId> - <artifactId>jsf4portlets</artifactId> - <version>${pom.version}</version> - <scope>compile</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - </dependencies> - </dependencyManagement> - -</project> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets-project</artifactId> + <version>1.0-alpha-2</version> + + <packaging>pom</packaging> + + <name>JSF 4 Portlets</name> + <url>http://jsf4portlets.sf.net/</url> + + <scm> + <connection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/tags/jsf4portlets-project-1.0-alpha-2</connection> + <developerConnection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/tags/jsf4portlets-project-1.0-alpha-2</developerConnection> + <url>http://jsf4portlets.svn.sourceforge.net/viewvc/jsf4portlets/tags/jsf4portlets-project-1.0-alpha-2</url> + </scm> + + <description> + JSF 4 Portlets is an implementation of the JSR-301 (JSF Portlet Bridge). + </description> + + <licenses> + <license> + <name>Lesser General Public License</name> + <url>http://www.opensource.org/licenses/lgpl-license.php</url> + </license> + </licenses> + + <developers> + <developer> + <id>alonso</id> + <name>A. Alonso Dominguez</name> + <email>alo...@us...</email> + <roles> + <role>Developer</role> + </roles> + <timezone>-1</timezone> + </developer> + </developers> + + <mailingLists> + <mailingList> + <name>Developer Mailing List</name> + <subscribe>jsf...@li...</subscribe> + <unsubscribe>jsf...@li...</unsubscribe> + </mailingList> + </mailingLists> + + <issueManagement> + <system>SourceForge.net</system> + <url>http://sourceforge.net/tracker/?group_id=196120</url> + </issueManagement> + + <distributionManagement> + <site> + <id>shell.sf.net</id> + <name>JSF 4 Portlets Website</name> + <url>scp://shell.sf.net/home/groups/j/js/jsf4portlets/htdocs/web</url> + </site> + <repository> + <id>shell.sf.net</id> + <name>JSF 4 Portlets Release Repository</name> + <url>scp://shell.sf.net/home/groups/j/js/jsf4portlets/htdocs/repository/releases</url> + <uniqueVersion>false</uniqueVersion> + </repository> + <snapshotRepository> + <id>shell.sf.net</id> + <name>JSF 4 Portlets Snapshot Repository</name> + <url>scp://shell.sf.net/home/groups/j/js/jsf4portlets/htdocs/repository/snapshots</url> + <uniqueVersion>true</uniqueVersion> + <layout>default</layout> + </snapshotRepository> + </distributionManagement> + + <modules> + <module>jsf4portlets</module> + <module>jsf4portlets-ext</module> + </modules> + + <build> + <defaultGoal>install</defaultGoal> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/assembly/bin.xml</descriptor> + <descriptor>src/assembly/src.xml</descriptor> + </descriptors> + </configuration> + </plugin> + </plugins> + </build> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + <!--<plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changelog-plugin</artifactId> + </plugin>--> + </plugins> + </reporting> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>javax.el</groupId> + <artifactId>el-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + <version>1.2</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>jsr250-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.portlet</groupId> + <artifactId>portlet-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + <version>1.8</version> + <scope>compile</scope> + <exclusions> + <exclusion> + <artifactId>avalon-framework</artifactId> + <groupId>avalon-framework</groupId> + </exclusion> + <exclusion> + <artifactId>log4j</artifactId> + <groupId>log4j</groupId> + </exclusion> + <exclusion> + <artifactId>logkit</artifactId> + <groupId>logkit</groupId> + </exclusion> + <exclusion> + <artifactId>servlet-api</artifactId> + <groupId>javax.servlet</groupId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>catalina</artifactId> + <version>6.0.13</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-plus</artifactId> + <version>6.1.2</version> + <scope>compile</scope> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + </exclusion> + <exclusion> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + </exclusion> + <exclusion> + <groupId>geronimo-spec</groupId> + <artifactId>geronimo-spec-jta</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>com.sun.facelets</groupId> + <artifactId>jsf-facelets</artifactId> + <version>1.1.11</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> + </dependencyManagement> + +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-09-28 08:59:29
|
Revision: 33 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=33&view=rev Author: alonsoft Date: 2007-09-28 01:59:28 -0700 (Fri, 28 Sep 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/jsf4portlets/pom.xml trunk/jsf4portlets-ext/pom.xml trunk/pom.xml Modified: trunk/jsf4portlets/pom.xml =================================================================== --- trunk/jsf4portlets/pom.xml 2007-09-28 08:59:20 UTC (rev 32) +++ trunk/jsf4portlets/pom.xml 2007-09-28 08:59:28 UTC (rev 33) @@ -4,7 +4,7 @@ <parent> <groupId>net.sf.jsf4portlets</groupId> <artifactId>jsf4portlets-project</artifactId> - <version>1.0-alpha-2</version> + <version>1.0-alpha-3-SNAPSHOT</version> </parent> <artifactId>jsf4portlets</artifactId> Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2007-09-28 08:59:20 UTC (rev 32) +++ trunk/jsf4portlets-ext/pom.xml 2007-09-28 08:59:28 UTC (rev 33) @@ -4,7 +4,7 @@ <parent> <groupId>net.sf.jsf4portlets</groupId> <artifactId>jsf4portlets-project</artifactId> - <version>1.0-alpha-2</version> + <version>1.0-alpha-3-SNAPSHOT</version> </parent> <artifactId>jsf4portlets-ext</artifactId> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-09-28 08:59:20 UTC (rev 32) +++ trunk/pom.xml 2007-09-28 08:59:28 UTC (rev 33) @@ -3,7 +3,7 @@ <groupId>net.sf.jsf4portlets</groupId> <artifactId>jsf4portlets-project</artifactId> - <version>1.0-alpha-2</version> + <version>1.0-alpha-3-SNAPSHOT</version> <packaging>pom</packaging> @@ -11,9 +11,9 @@ <url>http://jsf4portlets.sf.net/</url> <scm> - <connection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/tags/jsf4portlets-project-1.0-alpha-2</connection> - <developerConnection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/tags/jsf4portlets-project-1.0-alpha-2</developerConnection> - <url>http://jsf4portlets.svn.sourceforge.net/viewvc/jsf4portlets/tags/jsf4portlets-project-1.0-alpha-2</url> + <connection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/trunk</connection> + <developerConnection>scm:svn:https://jsf4portlets.svn.sourceforge.net/svnroot/jsf4portlets/trunk</developerConnection> + <url>http://jsf4portlets.svn.sourceforge.net/viewvc/jsf4portlets/trunk</url> </scm> <description> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-09-28 18:08:24
|
Revision: 34 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=34&view=rev Author: alonsoft Date: 2007-09-28 11:08:20 -0700 (Fri, 28 Sep 2007) Log Message: ----------- Added event support at extensions module Modified Paths: -------------- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java trunk/jsf4portlets-ext/pom.xml trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml trunk/pom.xml Added Paths: ----------- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java trunk/jsf4portlets-ext/src/main/resources/net/ trunk/jsf4portlets-ext/src/main/resources/net/sf/ trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java 2007-09-28 08:59:28 UTC (rev 33) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/config/ApplicationConfiguration.java 2007-09-28 18:08:20 UTC (rev 34) @@ -60,6 +60,7 @@ PortletContext portletContext = (PortletContext) context.getContext(); result = new ApplicationConfiguration(); result.configure(portletContext); + context.getApplicationMap().put(INSTANCE_KEY, result); } return result; } Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2007-09-28 08:59:28 UTC (rev 33) +++ trunk/jsf4portlets-ext/pom.xml 2007-09-28 18:08:20 UTC (rev 34) @@ -59,6 +59,19 @@ </dependency> <dependency> + <artifactId>container</artifactId> + <groupId>com.sun.portal.portletcontainer</groupId> + </dependency> + <dependency> + <artifactId>portletcontainer</artifactId> + <groupId>com.sun.portal.portletcontainer</groupId> + </dependency> + <dependency> + <artifactId>portletappengine</artifactId> + <groupId>com.sun.portal.portletcontainer</groupId> + </dependency> + + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java 2007-09-28 18:08:20 UTC (rev 34) @@ -0,0 +1,56 @@ +package net.sf.jsf4portlets.event; + +import java.util.LinkedList; +import java.util.Queue; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.portlet.PortletSession; +import javax.portlet.faces.GenericFacesPortlet; + +import com.sun.portal.portletappengine.ipc.EventRequest; +import com.sun.portal.portletappengine.ipc.EventResponse; +import com.sun.portal.portletappengine.ipc.PortletEventListener; + +public class EventFacesPortlet extends GenericFacesPortlet +implements PortletEventListener { + + protected static final String QUEUED_EVENTS = + "javax.portlet.faces.extension.QUEUED_EVENTS"; + + private final Logger logger = Logger.getLogger( + EventFacesPortlet.class.getPackage().getName(), + "net.sf.jsf4portlets.ExtLogMessages"); + + public void handleEvent(EventRequest request, EventResponse response) { + Queue<PortletEvent> queue = getEventQueue(request); + PortletEvent event = new PortletEvent(this, + request.getEventName(), request.getEventData()); + queue.add(event); + if(logger.isLoggable(Level.FINER)) { + logger.log(Level.FINER, "J4PE_000001", new Object[]{ + event.getEventName(), getPortletName() + }); + } + } + + /** + * Obtains an event queue from the portlet session scope + * related to the given <code>EventRequest</code>. + * + * @param request the <code>EventRequest</code> + * @return an event queue + */ + @SuppressWarnings("unchecked") + private Queue<PortletEvent> getEventQueue(EventRequest request) { + PortletSession session = request.getPortletSession(true); + Queue<PortletEvent> queue = (Queue<PortletEvent>) session + .getAttribute(QUEUED_EVENTS); + if(queue == null) { + queue = new LinkedList<PortletEvent>(); + session.setAttribute(QUEUED_EVENTS, queue); + } + return queue; + } + +} Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java 2007-09-28 18:08:20 UTC (rev 34) @@ -0,0 +1,107 @@ +package net.sf.jsf4portlets.event; + +import java.util.Enumeration; +import java.util.Queue; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.el.ELException; +import javax.el.ExpressionFactory; +import javax.el.ValueExpression; +import javax.faces.FacesException; +import javax.faces.context.FacesContext; +import javax.faces.event.PhaseEvent; +import javax.faces.event.PhaseId; +import javax.faces.event.PhaseListener; + +import net.sf.jsf4portlets.config.ApplicationConfiguration; +import net.sf.jsf4portlets.config.ManagedBeanBean; +import net.sf.jsf4portlets.util.Util; + +public class EventPhaseListener implements PhaseListener { + + private final Logger logger = Logger.getLogger( + EventPhaseListener.class.getPackage().getName(), + "net.sf.jsf4portlets.ExtLogMessages"); + + public void afterPhase(PhaseEvent event) { + if(PhaseId.RESTORE_VIEW.equals(event.getPhaseId())) { + FacesContext context = event.getFacesContext(); + broadcast(context); + + context.getExternalContext().getSessionMap() + .remove(EventFacesPortlet.QUEUED_EVENTS); + } + } + + public void beforePhase(PhaseEvent event) { + if(PhaseId.RENDER_RESPONSE.equals(event.getPhaseId())) { + FacesContext context = event.getFacesContext(); + broadcast(context); + + context.getExternalContext().getSessionMap() + .remove(EventFacesPortlet.QUEUED_EVENTS); + } + } + + public PhaseId getPhaseId() { + return PhaseId.ANY_PHASE; + } + + @SuppressWarnings("unchecked") + private void broadcast(FacesContext context) { + Queue<PortletEvent> queue = (Queue<PortletEvent>) context + .getExternalContext().getSessionMap().get(EventFacesPortlet.QUEUED_EVENTS); + if(queue != null) { + PortletEvent event; + while(null != (event = queue.poll())) { + broadcastEvent(context, event); + } + } + } + + private void broadcastEvent(FacesContext context, PortletEvent event) + throws FacesException { + ApplicationConfiguration appConf = ApplicationConfiguration + .getInstance(context.getExternalContext()); + Enumeration<String> names = appConf.getManagedBeanNames(); + while(names.hasMoreElements()) { + String beanName = names.nextElement(); + ManagedBeanBean managedBean = appConf.getManagedBean(beanName); + Class<?> beanClass; + try { + beanClass = Util.loadClass(managedBean.getClassName(), this); + } catch(ClassNotFoundException e) { + throw new FacesException(e); + } + + if(PortletEventListener.class.isAssignableFrom(beanClass)) { + Object bean = resolveManagedBean(context, beanName, beanClass); + assert bean != null; + + if(logger.isLoggable(Level.FINER)) { + logger.log(Level.FINER, "J4PE_000002", new Object[]{ + event.getEventName(), beanName + }); + } + ((PortletEventListener) bean).handleEvent(event); + } + } + } + + private Object resolveManagedBean(FacesContext context, + String name, Class<?> beanClass) + throws FacesException { + ExpressionFactory ef = context.getApplication() + .getExpressionFactory(); + try { + ValueExpression ve = ef.createValueExpression( + context.getELContext(), "#{" + name + "}", + beanClass); + return beanClass.cast(ve.getValue(context.getELContext())); + } catch(ELException e) { + throw new FacesException(e); + } + } + +} Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java 2007-09-28 18:08:20 UTC (rev 34) @@ -0,0 +1,30 @@ +package net.sf.jsf4portlets.event; + +import java.util.EventObject; + +import javax.portlet.Portlet; + +public class PortletEvent extends EventObject { + + private String eventName; + private Object eventData; + + public PortletEvent(Portlet source, String eventName, Object eventData) { + super(source); + this.eventName = eventName; + this.eventData = eventData; + } + + public Portlet getPortlet() { + return (Portlet) super.getSource(); + } + + public String getEventName() { + return eventName; + } + + public Object getEventData() { + return eventData; + } + +} Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java 2007-09-28 18:08:20 UTC (rev 34) @@ -0,0 +1,9 @@ +package net.sf.jsf4portlets.event; + +import java.util.EventListener; + +public interface PortletEventListener extends EventListener { + + public void handleEvent(PortletEvent event); + +} Modified: trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml =================================================================== --- trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml 2007-09-28 08:59:28 UTC (rev 33) +++ trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml 2007-09-28 18:08:20 UTC (rev 34) @@ -27,4 +27,10 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" version="1.2"> + <lifecycle> + <phase-listener> + net.sf.jsf4portlets.event.EventPhaseListener + </phase-listener> + </lifecycle> + </faces-config> \ No newline at end of file Added: trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties =================================================================== --- trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties (rev 0) +++ trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties 2007-09-28 18:08:20 UTC (rev 34) @@ -0,0 +1,22 @@ +# JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +# Copyright (C) 2007 A. Alonso Dominguez +# +# This library 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 library 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 library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# A. Alonso Dominguez +# alo...@us... +# +J4PE_000001=J4PE000001: PortletEvent \'{0}\' has been queued for portlet {1}. +J4PE_000002=J4PE000002: Broadcasting event \'{0}\' to managed bean \"{1}\". \ No newline at end of file Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-09-28 08:59:28 UTC (rev 33) +++ trunk/pom.xml 2007-09-28 18:08:20 UTC (rev 34) @@ -195,7 +195,7 @@ <groupId>org.apache.tomcat</groupId> <artifactId>catalina</artifactId> <version>6.0.13</version> - <scope>compile</scope> + <scope>provided</scope> <optional>true</optional> </dependency> @@ -203,7 +203,7 @@ <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-plus</artifactId> <version>6.1.2</version> - <scope>compile</scope> + <scope>provided</scope> <optional>true</optional> <exclusions> <exclusion> @@ -230,6 +230,28 @@ </dependency> <dependency> + <groupId>com.sun.portal.portletcontainer</groupId> + <artifactId>container</artifactId> + <version>1.0</version> + <scope>provided</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.sun.portal.portletcontainer</groupId> + <artifactId>portletcontainer</artifactId> + <version>1.0</version> + <scope>provided</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.sun.portal.portletcontainer</groupId> + <artifactId>portletappengine</artifactId> + <version>1.0</version> + <scope>provided</scope> + <optional>true</optional> + </dependency> + + <dependency> <groupId>net.sf.jsf4portlets</groupId> <artifactId>jsf4portlets</artifactId> <version>${pom.version}</version> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2007-10-21 11:32:17
|
Revision: 35 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=35&view=rev Author: alonsoft Date: 2007-10-21 04:31:56 -0700 (Sun, 21 Oct 2007) Log Message: ----------- Modified for future version Modified Paths: -------------- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java trunk/jsf4portlets-ext/pom.xml trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java trunk/jsf4portlets-ext/src/site/site.xml trunk/pom.xml Added Paths: ----------- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoder.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/DefaultPortletURLEncoder.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java trunk/jsf4portlets-ext/src/site/apt/portlet_events.apt Removed Paths: ------------- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2007-10-21 11:31:56 UTC (rev 35) @@ -26,7 +26,13 @@ import java.net.MalformedURLException; import java.net.URL; import java.security.Principal; -import java.util.*; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; +import java.util.Set; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; @@ -41,11 +47,11 @@ import javax.portlet.PortletRequest; import javax.portlet.PortletRequestDispatcher; import javax.portlet.PortletResponse; -import javax.portlet.PortletURL; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; -import javax.portlet.faces.*; -import javax.portlet.faces.Bridge.*; +import javax.portlet.faces.Bridge; +import javax.portlet.faces.BridgeDefaultViewNotSpecifiedException; +import javax.portlet.faces.Bridge.PortletPhase; import net.sf.jsf4portlets.BridgeConstants; import net.sf.jsf4portlets.RequestScope; @@ -55,6 +61,8 @@ import net.sf.jsf4portlets.spi.InjectionProvider; import net.sf.jsf4portlets.spi.InjectionProviderException; import net.sf.jsf4portlets.spi.InjectionProviderFactory; +import net.sf.jsf4portlets.spi.PortletURLEncoder; +import net.sf.jsf4portlets.spi.PortletURLEncoderFactory; import net.sf.jsf4portlets.util.PathString; import net.sf.jsf4portlets.util.Util; @@ -153,67 +161,8 @@ @Override public String encodeActionURL(String url) { - logger.entering(ExternalContextImpl.class.getName(), "encodeActionURL", url); - if (url == null) { - throw new NullPointerException(); - } - if(!url.startsWith("#") && (url.startsWith("/") - && !url.startsWith(getRequestContextPath()))) { - logger.exiting(ExternalContext.class.getName(), "encodeActionURL", url); - return url; - } - - PathString qs = PathString.parse(this, url); - String directLink = qs.getParameter(Bridge.DIRECT_LINK); - if(directLink != null) { - if("true".equals(directLink)) { - logger.exiting(ExternalContext.class.getName(), "encodeActionURL", qs); - return qs.toString(); - } else { - qs.removeParameter(Bridge.DIRECT_LINK); - } - } - - String viewId = null; - if(qs.getContextPath().equals(getRequestContextPath())) { - ApplicationConfiguration config = - ApplicationConfiguration.getInstance(this); - String mapping = config.getFacesMapping(); - if(Util.isPrefixMapped(mapping)) { - int slash = mapping.lastIndexOf("/"); - String prefix = mapping.substring(0, slash); - if(qs.getPath().startsWith(prefix)) { - viewId = qs.getPath().substring(slash); - } - } - } - if(viewId == null) { - viewId = qs.getPath(); - } - if(!viewId.startsWith("/")) { - viewId = "/" + viewId; - } - if(logger.isLoggable(Level.FINER)) { - logger.log(Level.FINER, "J4P_000023", viewId); - } - - String result = null; - PortletPhase phase = Util.getPortletLifecyclePhase(this); - if(PortletPhase.RenderPhase.equals(phase)) { - RenderResponse response = (RenderResponse) getResponse(); - PortletURL portletURL = response.createActionURL(); - portletURL.setParameters(qs.getParameterMap()); - portletURL.setParameter(BridgeConstants.VIEW_ID_PARAMETER, viewId); - result = portletURL.toString(); - } else if(PortletPhase.ActionPhase.equals(phase)) { - RequestScope requestScope = Util.getRequestScope(this); - requestScope.setParameters(qs.getParameterMap()); - result = viewId; - } else { - throw new IllegalStateException(); - } - logger.exiting(ExternalContext.class.getName(), "encodeActionURL", result); - return result; + PortletURLEncoder encoder = PortletURLEncoderFactory.getEncoder(this); + return encoder.encodeActionURL(this, url); } @Override @@ -226,16 +175,8 @@ @Override public String encodeResourceURL(String url) { - if(url == null) { - throw new NullPointerException(); - } - - if(!url.startsWith("http") && !url.startsWith("https") - && !(url.startsWith("/"))) { - url = getRequestContextPath() + "/" + url; - } - - return (response.encodeURL(url)); + PortletURLEncoder encoder = PortletURLEncoderFactory.getEncoder(this); + return encoder.encodeResourceURL(this, url); } @Override Added: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoder.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoder.java (rev 0) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoder.java 2007-10-21 11:31:56 UTC (rev 35) @@ -0,0 +1,31 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.spi; + +import javax.faces.context.ExternalContext; + +public interface PortletURLEncoder { + + public String encodeActionURL(ExternalContext context, String url); + + public String encodeResourceURL(ExternalContext context, String url); + +} Added: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java (rev 0) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java 2007-10-21 11:31:56 UTC (rev 35) @@ -0,0 +1,49 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.spi; + +import javax.faces.context.ExternalContext; +import javax.portlet.PortletConfig; + +import net.sf.jsf4portlets.util.DefaultPortletURLEncoder; +import net.sf.jsf4portlets.util.Util; + +public final class PortletURLEncoderFactory { + + private static final PortletURLEncoder DEFAULT_ENCODER = + new DefaultPortletURLEncoder(); + + public static final String ENCODER_ATTR_PREFIX = + "javax.portlet.faces.extension.encoder."; + + public static PortletURLEncoder getEncoder(ExternalContext context) { + PortletConfig portletConfig = Util.getPortletConfig(context); + PortletURLEncoder instance = (PortletURLEncoder) context.getApplicationMap().get( + ENCODER_ATTR_PREFIX + portletConfig.getPortletName()); + if(instance == null) { + instance = DEFAULT_ENCODER; + } + return instance; + } + + private PortletURLEncoderFactory() { } + +} Added: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/DefaultPortletURLEncoder.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/DefaultPortletURLEncoder.java (rev 0) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/DefaultPortletURLEncoder.java 2007-10-21 11:31:56 UTC (rev 35) @@ -0,0 +1,118 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.util; + +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.faces.context.ExternalContext; +import javax.portlet.PortletResponse; +import javax.portlet.PortletURL; +import javax.portlet.RenderResponse; +import javax.portlet.faces.Bridge; +import javax.portlet.faces.Bridge.PortletPhase; + +import net.sf.jsf4portlets.BridgeConstants; +import net.sf.jsf4portlets.RequestScope; +import net.sf.jsf4portlets.config.ApplicationConfiguration; +import net.sf.jsf4portlets.spi.PortletURLEncoder; + +public class DefaultPortletURLEncoder implements PortletURLEncoder { + + private final Logger logger = Logger.getLogger( + DefaultPortletURLEncoder.class.getPackage().getName(), + "net.sf.jsf4portlets.LogMessages"); + + public String encodeActionURL(ExternalContext context, String url) { + if (url == null) { + throw new NullPointerException(); + } + if(!url.startsWith("#") && (url.startsWith("/") + && !url.startsWith(context.getRequestContextPath()))) { + return url; + } + + PathString qs = PathString.parse(context, url); + String directLink = qs.getParameter(Bridge.DIRECT_LINK); + if(directLink != null) { + if("true".equals(directLink)) { + return qs.toString(); + } else { + qs.removeParameter(Bridge.DIRECT_LINK); + } + } + + String viewId = null; + if(qs.getContextPath().equals(context.getRequestContextPath())) { + ApplicationConfiguration config = + ApplicationConfiguration.getInstance(context); + String mapping = config.getFacesMapping(); + if(Util.isPrefixMapped(mapping)) { + int slash = mapping.lastIndexOf("/"); + String prefix = mapping.substring(0, slash); + if(qs.getPath().startsWith(prefix)) { + viewId = qs.getPath().substring(slash); + } + } + } + if(viewId == null) { + viewId = qs.getPath(); + } + if(!viewId.startsWith("/")) { + viewId = "/" + viewId; + } + if(logger.isLoggable(Level.FINER)) { + logger.log(Level.FINER, "J4P_000023", viewId); + } + + String result = null; + PortletPhase phase = Util.getPortletLifecyclePhase(context); + if(PortletPhase.RenderPhase.equals(phase)) { + RenderResponse response = (RenderResponse) context.getResponse(); + PortletURL portletURL = response.createActionURL(); + portletURL.setParameters(qs.getParameterMap()); + portletURL.setParameter(BridgeConstants.VIEW_ID_PARAMETER, viewId); + result = portletURL.toString(); + } else if(PortletPhase.ActionPhase.equals(phase)) { + RequestScope requestScope = Util.getRequestScope(context); + requestScope.setParameters(qs.getParameterMap()); + result = viewId; + } else { + throw new IllegalStateException(); + } + return result; + } + + public String encodeResourceURL(ExternalContext context, String url) { + if(url == null) { + throw new NullPointerException(); + } + + if(!url.startsWith("http") && !url.startsWith("https") + && !(url.startsWith("/"))) { + url = context.getRequestContextPath() + "/" + url; + } + + PortletResponse response = (PortletResponse) context.getResponse(); + return (response.encodeURL(url)); + } + +} Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets-ext/pom.xml 2007-10-21 11:31:56 UTC (rev 35) @@ -70,6 +70,11 @@ <artifactId>portletappengine</artifactId> <groupId>com.sun.portal.portletcontainer</groupId> </dependency> + + <dependency> + <groupId>jsf-extensions</groupId> + <artifactId>jsf-extensions-run-time</artifactId> + </dependency> <dependency> <groupId>junit</groupId> Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java 2007-10-21 11:31:56 UTC (rev 35) @@ -1,3 +1,23 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ package net.sf.jsf4portlets.event; import java.util.LinkedList; Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java 2007-10-21 11:31:56 UTC (rev 35) @@ -1,3 +1,23 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ package net.sf.jsf4portlets.event; import java.util.Enumeration; @@ -75,7 +95,7 @@ throw new FacesException(e); } - if(PortletEventListener.class.isAssignableFrom(beanClass)) { + if(PortletListener.class.isAssignableFrom(beanClass)) { Object bean = resolveManagedBean(context, beanName, beanClass); assert bean != null; @@ -84,7 +104,7 @@ event.getEventName(), beanName }); } - ((PortletEventListener) bean).handleEvent(event); + ((PortletListener) bean).processPortlet(event); } } } Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java 2007-10-21 11:31:56 UTC (rev 35) @@ -1,3 +1,23 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ package net.sf.jsf4portlets.event; import java.util.EventObject; @@ -4,6 +24,14 @@ import javax.portlet.Portlet; +/** + * Representation of the event information received + * by the portlet and broadcasted to the application + * managed beans + * + * @author A. Alonso Domínguez + * + */ public class PortletEvent extends EventObject { private String eventName; @@ -15,14 +43,30 @@ this.eventData = eventData; } + /** + * Obtains the portlet which received the event + * + * @return the portlet which received the event + */ public Portlet getPortlet() { return (Portlet) super.getSource(); } + /** + * Obtains the event name + * + * @return the event name + */ public String getEventName() { return eventName; } + /** + * Obtains the object which represents the + * event data + * + * @return the event data + */ public Object getEventData() { return eventData; } Added: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java 2007-10-21 11:31:56 UTC (rev 35) @@ -0,0 +1,59 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.event; + +import java.io.Serializable; + +import javax.faces.FacesException; +import javax.faces.context.FacesContext; +import javax.portlet.PortletRequest; + +import com.sun.portal.portletappengine.ipc.EventNotRegisteredException; +import com.sun.portal.portletappengine.ipc.PortletEventBroker; + +public final class PortletEventHelper { + + private FacesContext context; + + public PortletEventHelper(FacesContext context) { + this.context = context; + } + + public void fireEvent(String name, Object data) + throws FacesException { + if(!(data instanceof Serializable)) { + throw new IllegalArgumentException(); + } + + PortletRequest request = (PortletRequest) context + .getExternalContext().getRequest(); + PortletEventBroker broker = new PortletEventBroker(request); + com.sun.portal.portletappengine.ipc.PortletEvent event; + try { + event = broker.createEvent(name); + } catch(EventNotRegisteredException e) { + throw new FacesException(e); + } + event.setEventData((Serializable) data); + event.fire(); + } + +} Deleted: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java 2007-10-21 11:31:56 UTC (rev 35) @@ -1,9 +0,0 @@ -package net.sf.jsf4portlets.event; - -import java.util.EventListener; - -public interface PortletEventListener extends EventListener { - - public void handleEvent(PortletEvent event); - -} Copied: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java (from rev 34, trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventListener.java) =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java (rev 0) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java 2007-10-21 11:31:56 UTC (rev 35) @@ -0,0 +1,29 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ +package net.sf.jsf4portlets.event; + +import java.util.EventListener; + +public interface PortletListener extends EventListener { + + public void processPortlet(PortletEvent event); + +} Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java 2007-10-21 11:31:56 UTC (rev 35) @@ -1,3 +1,23 @@ +/* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + * Copyright (C) 2007 A. Alonso Dominguez + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A. Alonso Dominguez + * alo...@us... + */ package net.sf.jsf4portlets.facelets; import java.io.IOException; Added: trunk/jsf4portlets-ext/src/site/apt/portlet_events.apt =================================================================== --- trunk/jsf4portlets-ext/src/site/apt/portlet_events.apt (rev 0) +++ trunk/jsf4portlets-ext/src/site/apt/portlet_events.apt 2007-10-21 11:31:56 UTC (rev 35) @@ -0,0 +1,133 @@ +~~ +~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) +~~ Copyright (C) 2007 A. Alonso Dominguez +~~ +~~ This library 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 library 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 library; if not, write to the Free Software +~~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +~~ +~~ A. Alonso Dominguez +~~ alo...@us... +~~ + + --- + JSF 4 Portlets Extensions - Portlet Events + --- + A. Alonso Dominguez + --- + +Inter-Portlet Communication + +* Before Starting + + This is an especial feature on JSR-168 portlets and support for portlet events must be implemented on the portlet container. Currently, JSF 4 Portlets gives support for portlet events if those portlets are deployed with the {{{http://portlet-container.dev.java.net}Open Source Portlet Container}}. + +Event Support + +* Configuring Container + + Firts of all, you must add a file called <<<sun-portlet.xml>>> to the <<<WEB-INF>>> folder inside your portlet application. In that file you must specify which portlets will generate/consume events. Following is an example: + ++--- +<sun-portlet-app> +... + + <portlet> + <portlet-name>Faces Portlet</portlet-name> + ... + + <events> + <generates-event>EventName</generates-event> + + <consume-event>PayOrder</consume-event> + ... + </events> + + </portlet> + +... +</sun-portlet-app> ++--- + + If you need more information you take a look at the following link: {{https://portlet-container.dev.java.net/docs/ipc/IPC.html}}. + +* Configure the EventFacesPortlet + + Once you have configured which events will generate/consume your portlet, you must use a portlet implementation able to listen to portlet events. JSF 4 Portlets gives you one at: <<<net.sf.jsf4portlets.event.EventFacesPortlet>>>. + + Notice that <<<net.sf.jsf4portlets.event.EventFacesPortlet>>> is an extension of <<<javax.portlet.faces.GenericFacesPortlet>>> so it must be configured the same way the faces portlet is configured. You may take a look at the {{{http://jsf4portlets.sf.net/web/user_docs.html}User Documentation}}. Following is an example of how to configure the <<<EventFacesPortlet>>>: + ++--- +<portlet-app> +... + + <portlet> + <portlet-name>Faces Portlet</portlet-name> + <portlet-class> + net.sf.jsf4portlets.event.EventFacesPortlet + </portlet-class> + + ... + </portlet> + +... +</portlet-app> ++--- + +Working with events + +* Generating Events + + Events are generated using a helper class called <<<net.sf.jsf4portlets.event.PortletEventHelper>>>: + ++--- +import ... +import net.sf.jsf4portlets.event.PortletEventHelper + +... + +public class EventGeneratorBean { + + public void actionPerformed(ActionEvent event) { + FacesContext context = FacesContext.getCurrentInstance(); + + // Do action processing + + PortletEventHelper helper = new PortletEventHelper(context); + helper.fireEvent("EventName", eventData); + } + +} ++--- + +* Consuming Events + + Portlet events are received by managed beans just before the <<<RENDER_RESPONSE>>> phase. A managed bean which needs to be aware of portlet events must implement the <<<net.sf.jsf4portlets.event.PortletListener>>> interface. This interface has just a method which is the entry point of the event processing. Following is an example of a managed bean which is aware of portlet events: + ++--- +import ... +import net.sf.jsf4portlets.event.PortletEvent +import net.sf.jsf4portlets.event.PortletListener + +... + +public class EventAwareBean implements PortletListener { + + public void processPortlet(PortletEvent event) { + if("PayOrder".equals(event.getEventName()) { + // Process "PayOrder" bean. + } + } + +} ++--- \ No newline at end of file Modified: trunk/jsf4portlets-ext/src/site/site.xml =================================================================== --- trunk/jsf4portlets-ext/src/site/site.xml 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/jsf4portlets-ext/src/site/site.xml 2007-10-21 11:31:56 UTC (rev 35) @@ -46,7 +46,8 @@ </menu> <menu name="Feature Documentation"> - <item name="Facelets" href="facelets.html" /> + <item name="Facelets" href="facelets.html" /> + <item name="Portlet Events" href="portlet_events.html" /> </menu> <menu ref="reports" /> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-09-28 18:08:20 UTC (rev 34) +++ trunk/pom.xml 2007-10-21 11:31:56 UTC (rev 35) @@ -72,7 +72,15 @@ <layout>default</layout> </snapshotRepository> </distributionManagement> - + + <repositories> + <repository> + <id>java.net</id> + <url>http://download.java.net/maven/1</url> + <layout>legacy</layout> + </repository> + </repositories> + <modules> <module>jsf4portlets</module> <module>jsf4portlets-ext</module> @@ -250,8 +258,16 @@ <scope>provided</scope> <optional>true</optional> </dependency> - + <dependency> + <groupId>jsf-extensions</groupId> + <artifactId>jsf-extensions-run-time</artifactId> + <version>0.1alpha4</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + + <dependency> <groupId>net.sf.jsf4portlets</groupId> <artifactId>jsf4portlets</artifactId> <version>${pom.version}</version> @@ -267,4 +283,4 @@ </dependencies> </dependencyManagement> -</project> \ No newline at end of file +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2008-06-13 16:08:10
|
Revision: 39 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=39&view=rev Author: alonsoft Date: 2008-06-13 09:08:04 -0700 (Fri, 13 Jun 2008) Log Message: ----------- Restructuracion - ED3 Modified Paths: -------------- trunk/jsf4portlets-ext/pom.xml trunk/pom.xml Added Paths: ----------- trunk/jsf4portlets/ trunk/jsf4portlets/pom.xml trunk/jsf4portlets/src/ trunk/jsf4portlets/src/main/ trunk/jsf4portlets/src/main/java/ trunk/jsf4portlets/src/main/java/javax/ trunk/jsf4portlets/src/main/java/javax/portlet/ trunk/jsf4portlets/src/main/java/net/ trunk/jsf4portlets/src/main/java/net/sf/ trunk/jsf4portlets/src/main/resources/ trunk/jsf4portlets/src/main/resources/META-INF/ trunk/jsf4portlets/src/main/resources/META-INF/MANIFEST.MF trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml trunk/jsf4portlets/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd trunk/jsf4portlets/src/main/resources/META-INF/services/ trunk/jsf4portlets/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory trunk/jsf4portlets/src/main/resources/META-INF/services/javax.portlet.faces.Bridge trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider trunk/jsf4portlets/src/main/resources/net/ trunk/jsf4portlets/src/main/resources/net/sf/ trunk/jsf4portlets/src/site/ trunk/jsf4portlets/src/site/site.xml Removed Paths: ------------- trunk/jsf4portlets/src/main/java/javax/portlet/ trunk/jsf4portlets/src/main/java/net/sf/ trunk/jsf4portlets/src/main/resources/META-INF/MANIFEST.MF trunk/jsf4portlets/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd trunk/jsf4portlets/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory trunk/jsf4portlets/src/main/resources/META-INF/services/javax.portlet.faces.Bridge trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider trunk/jsf4portlets/src/main/resources/net/sf/ trunk/jsf4portlets/src/site/site.xml trunk/jsf4portlets-api/ trunk/jsf4portlets-impl/ Copied: trunk/jsf4portlets/pom.xml (from rev 36, trunk/jsf4portlets-impl/pom.xml) =================================================================== --- trunk/jsf4portlets/pom.xml (rev 0) +++ trunk/jsf4portlets/pom.xml 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1,97 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>net.sf.jsf4portlets</groupId> + <artifactId>jsf4portlets-project</artifactId> + <version>1.0-alpha-3-SNAPSHOT</version> + </parent> + + <artifactId>jsf4portlets-impl</artifactId> + <packaging>jar</packaging> + + <name>JSF 4 Portlets Impl</name> + + <description> + This is the main module of JSF 4 Portlets. This module brings an implementation of + the JSF Portlet Bridge (JSR-301) which allows JSR-168 Portlets running as JSF applications. + </description> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile> + </archive> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>javax.el</groupId> + <artifactId>el-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>jsr250-api</artifactId> + </dependency> + <dependency> + <groupId>javax.portlet</groupId> + <artifactId>portlet-api</artifactId> + </dependency> + + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>catalina</artifactId> + </dependency> + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-plus</artifactId> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + </dependencies> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + </plugins> + </reporting> + +</project> Copied: trunk/jsf4portlets/src/main/java/javax (from rev 36, trunk/jsf4portlets-api/src/main/java/javax) Copied: trunk/jsf4portlets/src/main/java/javax/portlet (from rev 38, trunk/jsf4portlets-api/src/main/java/javax/portlet) Copied: trunk/jsf4portlets/src/main/java/net (from rev 36, trunk/jsf4portlets-impl/src/main/java/net) Copied: trunk/jsf4portlets/src/main/java/net/sf (from rev 38, trunk/jsf4portlets-impl/src/main/java/net/sf) Copied: trunk/jsf4portlets/src/main/resources/META-INF (from rev 36, trunk/jsf4portlets-api/src/main/resources/META-INF) Deleted: trunk/jsf4portlets/src/main/resources/META-INF/MANIFEST.MF =================================================================== --- trunk/jsf4portlets-api/src/main/resources/META-INF/MANIFEST.MF 2008-06-10 21:17:17 UTC (rev 36) +++ trunk/jsf4portlets/src/main/resources/META-INF/MANIFEST.MF 2008-06-13 16:08:04 UTC (rev 39) @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -Archiver-Version: Plexus Archiver -Built-By: A. Alonso Dominguez -Build-Jdk: jdk 1.5 -Specification-Title: Portlet 1.0 Bridge for Java Server Faces 1.2 -Specification-Version: 1.0.0ed3 -Implementation-Title: JSF 4 Portlets -Implementation-Version: 1.0-alpha-3 -Implementation-Vendor: SourceForge.net \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/META-INF/MANIFEST.MF (from rev 38, trunk/jsf4portlets-api/src/main/resources/META-INF/MANIFEST.MF) =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/MANIFEST.MF (rev 0) +++ trunk/jsf4portlets/src/main/resources/META-INF/MANIFEST.MF 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Built-By: A. Alonso Dominguez +Build-Jdk: jdk 1.5 +Specification-Title: Portlet 1.0 Bridge for Java Server Faces 1.2 +Specification-Version: 1.0.0ed3 +Implementation-Title: JSF 4 Portlets +Implementation-Version: 1.0-alpha-3 +Implementation-Vendor: SourceForge.net \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml (from rev 36, trunk/jsf4portlets-impl/src/main/resources/META-INF/faces-config.xml) =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml (rev 0) +++ trunk/jsf4portlets/src/main/resources/META-INF/faces-config.xml 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2008 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + +<faces-config xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:bridge="http://jsf4portlets.sf.net/jsfportlet" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd + http://jsf4portlets.sf.net/jsfportlet http://jsf4portlets.sf.net/xml/ns/portlet1.0_bridge_faces1.2_faces-config-extension.xsd" + version="1.2"> + + <lifecycle> + <phase-listener> + net.sf.jsf4portlets.application.BridgeLifecycleListener + </phase-listener> + </lifecycle> + + <application> + <view-handler> + net.sf.jsf4portlets.application.ViewHandlerImpl + </view-handler> + <state-manager> + net.sf.jsf4portlets.application.StateManagerImpl + </state-manager> + <el-resolver> + javax.portlet.faces.el.PortletELResolver + </el-resolver> + <application-extension> + <bridge:excluded-attributes> + <bridge:excluded-attribute> + com.sun.faces.* + </bridge:excluded-attribute> + <bridge:excluded-attribute> + net.sf.jsf4portlets.* + </bridge:excluded-attribute> + </bridge:excluded-attributes> + </application-extension> + </application> + +</faces-config> \ No newline at end of file Deleted: trunk/jsf4portlets/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd =================================================================== --- trunk/jsf4portlets-api/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd 2008-06-10 21:17:17 UTC (rev 36) +++ trunk/jsf4portlets/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd 2008-06-13 16:08:04 UTC (rev 39) @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - Copyright (C) 2008 A. Alonso Dominguez - - This library 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 library 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 library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - A. Alonso Dominguez - alo...@us... ---> - -<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" - targetNamespace="http://jsf4portlets.sf.net/jsfportlet" id="bridge" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - - <xs:element name="excluded-attributes"> - <xs:annotation> - <xs:documentation> - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element name="excluded-attribute" type="xs:string" - minOccurs="0" maxOccurs="unbounded"> - <xs:annotation> - <xs:documentation> - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - -</xs:schema> \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd (from rev 38, trunk/jsf4portlets-api/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd) =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd (rev 0) +++ trunk/jsf4portlets/src/main/resources/META-INF/portlet1.0_bridge_faces1.2_faces-config-extension.xsd 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2008 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + +<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + targetNamespace="http://jsf4portlets.sf.net/jsfportlet" id="bridge" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <xs:element name="excluded-attributes"> + <xs:annotation> + <xs:documentation> + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element name="excluded-attribute" type="xs:string" + minOccurs="0" maxOccurs="unbounded"> + <xs:annotation> + <xs:documentation> + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + +</xs:schema> \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/META-INF/services (from rev 36, trunk/jsf4portlets-impl/src/main/resources/META-INF/services) Deleted: trunk/jsf4portlets/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory =================================================================== --- trunk/jsf4portlets-impl/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory 2008-06-10 21:17:17 UTC (rev 36) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory 2008-06-13 16:08:04 UTC (rev 39) @@ -1 +0,0 @@ -net.sf.jsf4portlets.context.FacesContextFactoryImpl \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory (from rev 38, trunk/jsf4portlets-impl/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory) =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory (rev 0) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/javax.faces.context.FacesContextFactory 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1 @@ +net.sf.jsf4portlets.context.FacesContextFactoryImpl \ No newline at end of file Deleted: trunk/jsf4portlets/src/main/resources/META-INF/services/javax.portlet.faces.Bridge =================================================================== --- trunk/jsf4portlets-impl/src/main/resources/META-INF/services/javax.portlet.faces.Bridge 2008-06-10 21:17:17 UTC (rev 36) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/javax.portlet.faces.Bridge 2008-06-13 16:08:04 UTC (rev 39) @@ -1 +0,0 @@ -net.sf.jsf4portlets.BridgeImpl \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/META-INF/services/javax.portlet.faces.Bridge (from rev 38, trunk/jsf4portlets-impl/src/main/resources/META-INF/services/javax.portlet.faces.Bridge) =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/services/javax.portlet.faces.Bridge (rev 0) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/javax.portlet.faces.Bridge 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1 @@ +net.sf.jsf4portlets.BridgeImpl \ No newline at end of file Deleted: trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider =================================================================== --- trunk/jsf4portlets-impl/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider 2008-06-10 21:17:17 UTC (rev 36) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider 2008-06-13 16:08:04 UTC (rev 39) @@ -1,2 +0,0 @@ -net.sf.jsf4portlets.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor -net.sf.jsf4portlets.vendor.Jetty6InjectionProvider:org.mortbay.jetty.annotation.LifeCycleCallbackCollection \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider (from rev 38, trunk/jsf4portlets-impl/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider) =================================================================== --- trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider (rev 0) +++ trunk/jsf4portlets/src/main/resources/META-INF/services/net.sf.jsf4portlets.spi.InjectionProvider 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1,2 @@ +net.sf.jsf4portlets.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor +net.sf.jsf4portlets.vendor.Jetty6InjectionProvider:org.mortbay.jetty.annotation.LifeCycleCallbackCollection \ No newline at end of file Copied: trunk/jsf4portlets/src/main/resources/net (from rev 36, trunk/jsf4portlets-impl/src/main/resources/net) Copied: trunk/jsf4portlets/src/main/resources/net/sf (from rev 38, trunk/jsf4portlets-impl/src/main/resources/net/sf) Copied: trunk/jsf4portlets/src/site (from rev 36, trunk/jsf4portlets-impl/src/site) Deleted: trunk/jsf4portlets/src/site/site.xml =================================================================== --- trunk/jsf4portlets-impl/src/site/site.xml 2008-06-10 21:17:17 UTC (rev 36) +++ trunk/jsf4portlets/src/site/site.xml 2008-06-13 16:08:04 UTC (rev 39) @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - Copyright (C) 2007 A. Alonso Dominguez - - This library 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 library 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 library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - A. Alonso Dominguez - alo...@us... ---> - -<project name="JSF 4 Portlets Core"> - <bannerLeft> - <name>SourceForge.net Logo</name> - <src>http://sflogo.sourceforge.net/sflogo.php?group_id=196120&type=5</src> - <href>http://www.sourceforge.net</href> - </bannerLeft> - <bannerRight> - <name>JSF 4 Portlets</name> - <href>http://jsf4portlets.sf.net</href> - </bannerRight> - - <body> - <links> - <item name="JSF 4 Portlets" href="http://jsf4portlets.sf.net" /> - <item name="SF Project Page" href="http://sf.net/projects/jsf4portlets" /> - <item name="JSR-301" href="http://jcp.org/en/jsr/detail?id=301" /> - </links> - - <menu name="Main Menu"> - <item name="Overview" href="index.html" /> - <item name="License" href="license.html" /> - </menu> - - <menu ref="reports" /> - </body> -</project> \ No newline at end of file Copied: trunk/jsf4portlets/src/site/site.xml (from rev 38, trunk/jsf4portlets-impl/src/site/site.xml) =================================================================== --- trunk/jsf4portlets/src/site/site.xml (rev 0) +++ trunk/jsf4portlets/src/site/site.xml 2008-06-13 16:08:04 UTC (rev 39) @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2007 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + +<project name="JSF 4 Portlets Core"> + <bannerLeft> + <name>SourceForge.net Logo</name> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=196120&type=5</src> + <href>http://www.sourceforge.net</href> + </bannerLeft> + <bannerRight> + <name>JSF 4 Portlets</name> + <href>http://jsf4portlets.sf.net</href> + </bannerRight> + + <body> + <links> + <item name="JSF 4 Portlets" href="http://jsf4portlets.sf.net" /> + <item name="SF Project Page" href="http://sf.net/projects/jsf4portlets" /> + <item name="JSR-301" href="http://jcp.org/en/jsr/detail?id=301" /> + </links> + + <menu name="Main Menu"> + <item name="Overview" href="index.html" /> + <item name="License" href="license.html" /> + </menu> + + <menu ref="reports" /> + </body> +</project> \ No newline at end of file Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2008-06-11 23:47:09 UTC (rev 38) +++ trunk/jsf4portlets-ext/pom.xml 2008-06-13 16:08:04 UTC (rev 39) @@ -55,8 +55,7 @@ </dependency> <dependency> <groupId>net.sf.jsf4portlets</groupId> - <artifactId>jsf4portlets-impl</artifactId> - <version>${pom.version}</version> + <artifactId>jsf4portlets</artifactId> </dependency> <dependency> @@ -105,4 +104,4 @@ </plugins> </reporting> -</project> \ No newline at end of file +</project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-06-11 23:47:09 UTC (rev 38) +++ trunk/pom.xml 2008-06-13 16:08:04 UTC (rev 39) @@ -82,8 +82,7 @@ </repositories> <modules> - <module>jsf4portlets-api</module> - <module>jsf4portlets-impl</module> + <module>jsf4portlets</module> <module>jsf4portlets-ext</module> </modules> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alo...@us...> - 2008-06-19 16:20:41
|
Revision: 41 http://jsf4portlets.svn.sourceforge.net/jsf4portlets/?rev=41&view=rev Author: alonsoft Date: 2008-06-19 09:20:33 -0700 (Thu, 19 Jun 2008) Log Message: ----------- Implementation for the Early Draft 3 Modified Paths: -------------- trunk/jsf4portlets/pom.xml trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextFactoryImpl.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/BridgeURL.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/URLUtil.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java trunk/jsf4portlets-ext/pom.xml trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties trunk/pom.xml trunk/src/site/apt/release_notes.apt trunk/src/site/apt/user_docs.apt Modified: trunk/jsf4portlets/pom.xml =================================================================== --- trunk/jsf4portlets/pom.xml 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/pom.xml 2008-06-19 16:20:33 UTC (rev 41) @@ -1,3 +1,27 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2008 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -56,11 +80,6 @@ <groupId>javax.portlet</groupId> <artifactId>portlet-api</artifactId> </dependency> - - <dependency> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - </dependency> <dependency> <groupId>org.apache.tomcat</groupId> @@ -86,6 +105,10 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> </plugin> <plugin> <groupId>net.sourceforge.maven-taglib</groupId> @@ -94,6 +117,10 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jdepend-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> </plugin> </plugins> </reporting> Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/RequestScopeManager.java 2008-06-19 16:20:33 UTC (rev 41) @@ -320,9 +320,7 @@ scopes.put(scopeId, scope); watchRequestScope(context.getExternalContext()); } else if(PortletPhase.RenderPhase.equals(phase)) { - String scopeId = context.getExternalContext() - .getRequestParameterMap().get(REQUEST_SCOPE_KEY); - RequestScope scope = (scopeId != null ? scopes.get(scopeId) : null); + RequestScope scope = getPreviousRequestScope(context); if(scope != null) { scope.setViewState((String) context.getExternalContext() .getRequestMap().get(BridgeConstants.VIEW_STATE)); Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/ExternalContextImpl.java 2008-06-19 16:20:33 UTC (rev 41) @@ -69,7 +69,7 @@ * <p>Concrete implementation of <code>ExternalContext</code> for use in * a portlet environment.</p> */ -public class ExternalContextImpl extends ExternalContext +class ExternalContextImpl extends ExternalContext implements PortletExternalContext { private static final Logger logger = Logger.getLogger( @@ -306,12 +306,51 @@ if(null != (viewLink = bridgeUrl.getParameter(Bridge.VIEW_LINK))) { bridgeUrl.removeParameter(Bridge.VIEW_LINK); if("true".equals(viewLink)) { - result = encodeActionURL(bridgeUrl.toString()); + PortletPhase phase = getPortletLifecyclePhase(); + if(PortletPhase.ActionPhase.equals(phase)) { + result = encodeActionURL(bridgeUrl.toString()); + } else if(PortletPhase.RenderPhase.equals(phase)) { + RenderResponse response = (RenderResponse) this.response; + PortletURL portletURL = response.createRenderURL(); + + Enumeration<String> paramNames = bridgeUrl.getParameterNames(); + while(paramNames.hasMoreElements()) { + String param = paramNames.nextElement(); + if(Bridge.PORTLET_MODE_PARAMETER.equals(param)) { + PortletMode portletMode = new PortletMode(bridgeUrl.getParameter(param)); + try { + portletURL.setPortletMode(portletMode); + } catch (PortletModeException e) { + // do nothing as per spec + logger.log(Level.WARNING, "J4P_000052", portletMode); + } + } else if(Bridge.PORTLET_WINDOW_STATE_PARAMETER.equals(param)) { + WindowState windowState = new WindowState(bridgeUrl.getParameter(param)); + try { + portletURL.setWindowState(windowState); + } catch (WindowStateException e) { + // do nothing as per spec + logger.log(Level.WARNING, "J4P_000053", windowState); + } + } else if(Bridge.PORTLET_SECURE_PARAMETER.equals(param)) { + boolean secure = Boolean.parseBoolean(bridgeUrl.getParameter(param)); + try { + portletURL.setSecure(secure); + } catch (PortletSecurityException e) { + // do nothing as per spec + logger.log(Level.WARNING, "J4P_000054", secure); + } + } else { + portletURL.setParameter(param, bridgeUrl.getParameterValues(param)); + } + } + + result = portletURL.toString(); + } } } } - System.out.println("URL: " + bridgeUrl); if(result == null) { result = response.encodeURL(bridgeUrl.toString()); } Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextFactoryImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextFactoryImpl.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextFactoryImpl.java 2008-06-19 16:20:33 UTC (rev 41) @@ -28,7 +28,7 @@ import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; -public class FacesContextFactoryImpl extends FacesContextFactory { +public final class FacesContextFactoryImpl extends FacesContextFactory { private FacesContextFactory delegate = null; Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/context/FacesContextImpl.java 2008-06-19 16:20:33 UTC (rev 41) @@ -21,11 +21,13 @@ package net.sf.jsf4portlets.context; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.ResourceBundle; +import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -57,7 +59,7 @@ * a portlet environment.</p> */ -public final class FacesContextImpl extends FacesContext { +final class FacesContextImpl extends FacesContext { // -------------------------------------------------------- Static Variables @@ -116,6 +118,7 @@ @Override public Iterator<String> getClientIdsWithMessages() { + assertNotReleased(); return (messages.keySet().iterator()); } @@ -143,8 +146,19 @@ } @Override + @SuppressWarnings("unchecked") public Iterator<FacesMessage> getMessages() { assertNotReleased(); + + // Workaround Faces' RI to avoid the warning message + // about pending messages. + Map<String, Object> requestMap = getExternalContext().getRequestMap(); + Set<String> pendingClientIds = (Set) requestMap.get( + "com.sun.faces.clientIdMessagesNotDisplayed"); + if(pendingClientIds != null && !pendingClientIds.isEmpty()) { + pendingClientIds.clear(); + } + List<FacesMessage> results = new ArrayList<FacesMessage>(); Iterator<String> clientIds = messages.keySet().iterator(); while (clientIds.hasNext()) { @@ -248,11 +262,22 @@ } @Override + @SuppressWarnings("unchecked") public Iterator<FacesMessage> getMessages(String clientId) { assertNotReleased(); + + // Workaround Faces' RI to avoid the warning message + // about pending messages. + Map<String, Object> requestMap = getExternalContext().getRequestMap(); + Set<String> pendingClientIds = (Set) requestMap.get( + "com.sun.faces.clientIdMessagesNotDisplayed"); + if(pendingClientIds != null && !pendingClientIds.isEmpty()) { + pendingClientIds.remove(clientId); + } + List<FacesMessage> list = messages.get(clientId); if (list == null) { - list = new ArrayList<FacesMessage>(); + list = Collections.<FacesMessage>emptyList(); } return (list.iterator()); } Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/InjectionProviderFactory.java 2008-06-19 16:20:33 UTC (rev 41) @@ -35,7 +35,6 @@ import net.sf.jsf4portlets.BridgeConstants; import net.sf.jsf4portlets.util.Util; -import net.sf.jsf4portlets.vendor.GenericInjectionProvider; /** * @author A. Alonso Domínguez @@ -48,6 +47,9 @@ private static final String[] EMPTY_ARRAY = new String[0]; + private static final String INJECTION_PROVIDER_INSTANCE = + "net.sf.jsf4portlets.injection_provider.INSTANCE"; + private static final String INJECTION_PROVIDER_PROPERTY = "net.sf.jsf4portlets.injection_provider"; @@ -59,16 +61,21 @@ "net.sf.jsf4portlets.LogMessages"); public static InjectionProvider createInstance(PortletContext portletContext) { - String providerClass = findProviderClass(portletContext); - InjectionProvider provider = getProviderInstance(providerClass, portletContext); - if(provider.getClass() != NoopInjectionProvider.class) { - if(logger.isLoggable(Level.FINE)) { - logger.log(Level.FINE, "J4P_000037", providerClass); + InjectionProvider provider = (InjectionProvider) portletContext + .getAttribute(INJECTION_PROVIDER_INSTANCE); + if(provider == null) { + String providerClass = findProviderClass(portletContext); + provider = getProviderInstance(providerClass, portletContext); + if(provider.getClass() != NoopInjectionProvider.class) { + if(logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "J4P_000037", providerClass); + } + } else { + if(logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "J4P_000038"); + } } - } else { - if(logger.isLoggable(Level.FINE)) { - logger.log(Level.FINE, "J4P_000038"); - } + portletContext.setAttribute(INJECTION_PROVIDER_INSTANCE, provider); } return provider; } Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/spi/PortletURLEncoderFactory.java 2008-06-19 16:20:33 UTC (rev 41) @@ -23,7 +23,6 @@ import javax.faces.context.ExternalContext; import javax.portlet.PortletConfig; -import net.sf.jsf4portlets.util.DefaultPortletURLEncoder; import net.sf.jsf4portlets.util.Util; public final class PortletURLEncoderFactory { Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/BridgeURL.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/BridgeURL.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/BridgeURL.java 2008-06-19 16:20:33 UTC (rev 41) @@ -115,12 +115,11 @@ bridgeUrl.contextPath = context.getRequestContextPath(); processPath = processPath.substring(bridgeUrl.contextPath.length()); } - System.out.println("Context-Path: " + bridgeUrl.contextPath); if(processPath.length() > 0) { int idx = processPath.indexOf("?"); if(idx != -1) { - bridgeUrl.setPath(processPath.substring(0, idx - 1)); + bridgeUrl.setPath(processPath.substring(0, idx)); processPath = processPath.substring(idx + 1); } else { bridgeUrl.setPath(processPath); @@ -133,7 +132,7 @@ String name, value; idx = token.indexOf('='); if(idx > -1) { - name = token.substring(0, idx - 1); + name = token.substring(0, idx); value = token.substring(idx + 1); } else { name = token; Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/URLUtil.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/URLUtil.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/util/URLUtil.java 2008-06-19 16:20:33 UTC (rev 41) @@ -31,7 +31,7 @@ * @author alonso * */ -public final class URLUtil { +final class URLUtil { public static String getExtensionMapping(String viewId) { int i = viewId.indexOf("?"); Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Jetty6InjectionProvider.java 2008-06-19 16:20:33 UTC (rev 41) @@ -21,6 +21,7 @@ package net.sf.jsf4portlets.vendor; import net.sf.jsf4portlets.spi.ContainerInjectionProvider; +import net.sf.jsf4portlets.spi.GenericInjectionProvider; import net.sf.jsf4portlets.spi.InjectionProviderException; import org.mortbay.jetty.plus.annotation.LifeCycleCallbackCollection; Modified: trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java =================================================================== --- trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets/src/main/java/net/sf/jsf4portlets/vendor/Tomcat6InjectionProvider.java 2008-06-19 16:20:33 UTC (rev 41) @@ -23,6 +23,7 @@ import javax.portlet.PortletContext; import net.sf.jsf4portlets.spi.ContainerInjectionProvider; +import net.sf.jsf4portlets.spi.GenericInjectionProvider; import net.sf.jsf4portlets.spi.InjectionProviderException; import org.apache.AnnotationProcessor; Modified: trunk/jsf4portlets-ext/pom.xml =================================================================== --- trunk/jsf4portlets-ext/pom.xml 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/pom.xml 2008-06-19 16:20:33 UTC (rev 41) @@ -1,3 +1,27 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2008 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -91,6 +115,10 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> </plugin> <plugin> <groupId>net.sourceforge.maven-taglib</groupId> @@ -99,6 +127,10 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jdepend-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> </plugin> </plugins> </reporting> Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventFacesPortlet.java 2008-06-19 16:20:33 UTC (rev 41) @@ -1,5 +1,5 @@ /* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - * Copyright (C) 2007 A. Alonso Dominguez + * Copyright (C) 2008 A. Alonso Dominguez * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/EventPhaseListener.java 2008-06-19 16:20:33 UTC (rev 41) @@ -1,5 +1,5 @@ /* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - * Copyright (C) 2007 A. Alonso Dominguez + * Copyright (C) 2008 A. Alonso Dominguez * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,7 +20,6 @@ */ package net.sf.jsf4portlets.event; -import java.util.Enumeration; import java.util.Queue; import java.util.logging.Level; import java.util.logging.Logger; @@ -34,8 +33,9 @@ import javax.faces.event.PhaseId; import javax.faces.event.PhaseListener; -import net.sf.jsf4portlets.config.ApplicationConfiguration; -import net.sf.jsf4portlets.config.ManagedBeanImpl; +import net.sf.jsf4portlets.config.Configuration; +import net.sf.jsf4portlets.config.ConfigurationFactory; +import net.sf.jsf4portlets.config.ManagedBean; import net.sf.jsf4portlets.util.Util; public class EventPhaseListener implements PhaseListener { @@ -82,12 +82,9 @@ private void broadcastEvent(FacesContext context, PortletEvent event) throws FacesException { - ApplicationConfiguration appConf = ApplicationConfiguration - .getInstance(context.getExternalContext()); - Enumeration<String> names = appConf.getManagedBeanNames(); - while(names.hasMoreElements()) { - String beanName = names.nextElement(); - ManagedBeanImpl managedBean = appConf.getManagedBean(beanName); + Configuration appConf = ConfigurationFactory + .getConfiguration(context.getExternalContext()); + for(ManagedBean managedBean : appConf.getManagedBeans()) { Class<?> beanClass; try { beanClass = Util.loadClass(managedBean.getClassName(), this); @@ -96,12 +93,13 @@ } if(PortletListener.class.isAssignableFrom(beanClass)) { - Object bean = resolveManagedBean(context, beanName, beanClass); + Object bean = resolveManagedBean(context, + managedBean.getName(), beanClass); assert bean != null; if(logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "J4PE_000002", new Object[]{ - event.getEventName(), beanName + event.getEventName(), managedBean.getName() }); } ((PortletListener) bean).processPortlet(event); Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEvent.java 2008-06-19 16:20:33 UTC (rev 41) @@ -1,5 +1,5 @@ /* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - * Copyright (C) 2007 A. Alonso Dominguez + * Copyright (C) 2008 A. Alonso Dominguez * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletEventHelper.java 2008-06-19 16:20:33 UTC (rev 41) @@ -1,5 +1,5 @@ /* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - * Copyright (C) 2007 A. Alonso Dominguez + * Copyright (C) 2008 A. Alonso Dominguez * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/event/PortletListener.java 2008-06-19 16:20:33 UTC (rev 41) @@ -1,5 +1,5 @@ /* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - * Copyright (C) 2007 A. Alonso Dominguez + * Copyright (C) 2008 A. Alonso Dominguez * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java =================================================================== --- trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/java/net/sf/jsf4portlets/facelets/FaceletPortletViewHandler.java 2008-06-19 16:20:33 UTC (rev 41) @@ -1,5 +1,5 @@ /* JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - * Copyright (C) 2007 A. Alonso Dominguez + * Copyright (C) 2008 A. Alonso Dominguez * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml =================================================================== --- trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/resources/META-INF/faces-config.xml 2008-06-19 16:20:33 UTC (rev 41) @@ -2,7 +2,7 @@ <!-- JSF 4 Portlets - JSF Portlet Bridge (JSR-301) - Copyright (C) 2007 A. Alonso Dominguez + Copyright (C) 2008 A. Alonso Dominguez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Modified: trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties =================================================================== --- trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/jsf4portlets-ext/src/main/resources/net/sf/jsf4portlets/ExtLogMessages.properties 2008-06-19 16:20:33 UTC (rev 41) @@ -1,5 +1,5 @@ # JSF 4 Portlets - JSF Portlet Bridge (JSR-301) -# Copyright (C) 2007 A. Alonso Dominguez +# Copyright (C) 2008 A. Alonso Dominguez # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/pom.xml 2008-06-19 16:20:33 UTC (rev 41) @@ -1,3 +1,27 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- + JSF 4 Portlets - JSF Portlet Bridge (JSR-301) + Copyright (C) 2008 A. Alonso Dominguez + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A. Alonso Dominguez + alo...@us... +--> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -72,13 +96,19 @@ <layout>default</layout> </snapshotRepository> </distributionManagement> - + <repositories> <repository> - <id>java.net</id> + <id>maven1-java.net</id> + <name>Java.NET Maven 1 Repository</name> <url>http://download.java.net/maven/1</url> <layout>legacy</layout> </repository> + <repository> + <id>maven2-java.net</id> + <name>Java.NET Maven 2 Repository</name> + <url>http://download.java.net/maven/2</url> + </repository> </repositories> <modules> @@ -98,6 +128,14 @@ <target>1.5</target> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <configuration> + <downloadSources>true</downloadSources> + <downloadJavadocs>true</downloadJavadocs> + </configuration> + </plugin> </plugins> </pluginManagement> <plugins> @@ -122,16 +160,19 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <aggregate>true</aggregate> + </configuration> </plugin> <plugin> <groupId>net.sourceforge.maven-taglib</groupId> <artifactId>maven-taglib-plugin</artifactId> </plugin> - <!--<plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> - </plugin>--> + </plugin> </plugins> </reporting> Modified: trunk/src/site/apt/release_notes.apt =================================================================== --- trunk/src/site/apt/release_notes.apt 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/src/site/apt/release_notes.apt 2008-06-19 16:20:33 UTC (rev 41) @@ -1,6 +1,6 @@ ~~ ~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) -~~ Copyright (C) 2007 A. Alonso Dominguez +~~ Copyright (C) 2008 A. Alonso Dominguez ~~ ~~ This library is free software; you can redistribute it and/or ~~ modify it under the terms of the GNU Lesser General Public @@ -21,3 +21,11 @@ ~~ JSF 4 Portlets - Release Notes + + This is an implementation of the Early Draft 3 for JSR-301. + + This library is in <<alpha>> state, so API changes can come up without +notification. Use it by your own risk. + + The specification is currently an Early Draft, so some features may not +be available. Modified: trunk/src/site/apt/user_docs.apt =================================================================== --- trunk/src/site/apt/user_docs.apt 2008-06-18 18:20:39 UTC (rev 40) +++ trunk/src/site/apt/user_docs.apt 2008-06-19 16:20:33 UTC (rev 41) @@ -1,6 +1,6 @@ ~~ ~~ JSF 4 Portlets - JSF Portlet Bridge (JSR-301) -~~ Copyright (C) 2007 A. Alonso Dominguez +~~ Copyright (C) 2008 A. Alonso Dominguez ~~ ~~ This library is free software; you can redistribute it and/or ~~ modify it under the terms of the GNU Lesser General Public @@ -80,7 +80,7 @@ <portlet-app ...> <portlet> - <portlet-name>MyFacesPortlet</portlet-name> + <portlet-name>WelcomeFacesPortlet</portlet-name> <portlet-class> javax.portlet.faces.GenericFacesPortlet </portlet-class> @@ -104,15 +104,6 @@ If you want to configure this two features to every portlet in the same web application you must set the following in your <<<WEB-INF/web.xml>>> file. You can also specify these parameters in the <<<WEB-INF/portlet.xml>>> file as portlet init parameters. -*** Performing redirects againts the portal page: - -+--- -<context-param> - <param-name>javax.portlet.faces.ENCODE_REDIRECT_URL</param-name> - <param-value>true</param-value> -</context-param> -+--- - *** Preserving action parameters This attribute is used when we need access the portlet parameters which caused the current view to be rendered during the render phase. This parameters can be accessed using EL expressions like <<<#\{param.[param_name]\}>>>. @@ -154,7 +145,7 @@ +--- <filter> <filter-name>Faces Portlet Render Filter</filter-name> - <filter-class>javax.portlet.faces.BridgeRenderFilter</filter-class> + <filter-class>net.sf.jsf4portlets.BridgeRenderFilter</filter-class> </filter> <filter-mapping> @@ -204,4 +195,4 @@ <name>javax.portlet.faces.defaultViewId.[custom_portlet_mode]</name> <value>/custom.jsf</value> </init-param> -+--- \ No newline at end of file ++--- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |