[jboss-svn-commits] JBoss PortletSwap SVN: r139 - in portlets: 2_6 and 29 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 28 10:38:49 EDT 2007


Author: thomas.heute at jboss.com
Date: 2007-08-28 10:38:49 -0400 (Tue, 28 Aug 2007)
New Revision: 139

Added:
   portlets/2_6/
   portlets/2_6/bundles/
   portlets/2_6/bundles/HelloWorldJSFMyFacesPortlet.zip
   portlets/2_6/bundles/HelloWorldJSFSunRIPortlet.zip
   portlets/2_6/src/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/README.txt
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/build.xml
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/helloworldjsfmyfacesportlet.war
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/explode.jar
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/myfaces-impl.jar
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/portal-common-lib.jar
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/portlet-api-lib.jar
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/portlet/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/portlet/hello/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/portlet/hello/bean/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/portlet/hello/bean/User.java
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/faces-config.xml
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/helloworld-object.xml
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/index.jsp
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/result.jsp
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/lib/
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet-instances.xml
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet.xml
   portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/web.xml
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/README.txt
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/build.xml
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/helloworldjsfsunriportlet.war
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/explode.jar
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/jsf-portlet.jar
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/portal-common-lib.jar
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/portlet-api-lib.jar
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/hello/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/hello/bean/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/hello/bean/User.java
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/faces-config.xml
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/helloworld-object.xml
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/index.jsp
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/result.jsp
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/lib/
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/lib/jsf-portlet.jar
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet-instances.xml
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet.xml
   portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/web.xml
Log:
Adding 2.6 versions of the JSF portlets

Added: portlets/2_6/bundles/HelloWorldJSFMyFacesPortlet.zip
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/bundles/HelloWorldJSFMyFacesPortlet.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/bundles/HelloWorldJSFSunRIPortlet.zip
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/bundles/HelloWorldJSFSunRIPortlet.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/README.txt
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/README.txt	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/README.txt	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,8 @@
+This portlet uses JSf as a rendering technology.
+
+1. Deploy the helloworldjsfmyfacesportlet.war (you may hot-deploy it.) by copying it to the portal's deploy directory, normally under JBOSS_HOME/server/default/deploy/*
+
+- This download bundle already includes the deployable portlet under, HelloWorldJSFMyFacesPortlet\output\lib\helloworldjsfmyfacesportlet.war
+
+It will work in JBoss AS having bundled myFaces (true for JBoss 4.0.5, not by default for 4.2.x)
+

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/build.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/build.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/build.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,88 @@
+<project name="JBoss HelloWorld JSF MyFaces Portlet"
+         default="deploy"
+         basedir=".">
+
+   <property name="app.name" value="helloworldjsfmyfacesportlet"/>
+
+   <property name="src.dir" value="${basedir}/src"/>
+
+   <property name="lib.dir" value="${basedir}/lib"/>
+
+   <property name="build.dir" value="${basedir}/output"/>
+
+   <property name="build.lib" value="${build.dir}/lib"/>
+
+   <property name="build.resources" value="${src.dir}/resources"/>
+
+   <property name="build.etc" value="${src.dir}/etc"/>
+
+   <property name="classes.dir" value="${build.dir}/classes"/>
+
+   <property name="dist.dir" value="${src.dir}/resources"/>
+
+   <property name="libs.api" value="${lib.dir}/portlet-api-lib.jar"/>
+
+   <property name="libs.ant"
+             value="${lib.dir}/explode.jar;${lib.dir}/portal-common-lib.jar;${lib.dir}/portal-core-lib.jar"/>
+
+   <property name="libs" value="${libs.api};${libs.ant}"/>
+
+   <available property="clover.available" classname="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+
+   <target name="clover-yes" depends="prepare" if="clover.available">
+      <property name="compiler" value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+   </target>
+
+   <target name="clover-no" depends="prepare" unless="clover.available">
+      <property name="compiler" value="modern"/>
+   </target>
+
+   <target name="prepare">
+      <mkdir dir="${classes.dir}"/>
+      <mkdir dir="${build.lib}"/>
+      <mkdir dir="${build.lib}/exploded"/>
+   </target>
+
+   <target name="clean">
+      <delete dir="${build.dir}"/>
+   </target>
+
+   <target name="deploy" depends="clover-yes, clover-no">
+      <javac srcdir="${src.dir}"
+             destdir="${classes.dir}"
+             classpath="${libs}"
+             debug="off"
+             optimize="on"
+             deprecation="on"
+             compiler="${compiler}"
+            >
+         <include name="main/org/jboss/portlet/**/*.java"/>
+      </javac>
+
+      <!-- helloworldjsfportlet-lib.jar -->
+      <jar jarfile="${build.lib}/helloworldjsfmyfacesportlet-lib.jar">
+         <fileset dir="${classes.dir}"/>
+      </jar>
+
+      <mkdir dir="${build.resources}/helloworldjsfmyfacesportlet-war/WEB-INF/lib"/>
+      <copy file="${build.lib}/helloworldjsfmyfacesportlet-lib.jar"
+            todir="${build.resources}/helloworldjsfmyfacesportlet-war/WEB-INF/lib"/>
+
+      <!-- helloworldjsfportlet.war -->
+      <jar jarfile="helloworldjsfmyfacesportlet.war">
+         <fileset dir="${build.resources}/helloworldjsfmyfacesportlet-war"/>
+      </jar>
+   </target>
+
+   <target name="explode" depends="deploy">
+      <taskdef classname="org.jboss.portal.common.ant.Explode"
+               name="explode"
+               classpath="${libs}"/>
+      <explode
+            file="helloworldjsfmyfacesportlet.war"
+            todir="${build.lib}/exploded"
+            name="helloworldjsfmyfacesportlet.war"/>
+   </target>
+   <target name="all" depends="deploy"/>
+</project>
+

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/helloworldjsfmyfacesportlet.war
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/helloworldjsfmyfacesportlet.war
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/explode.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/explode.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/myfaces-impl.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/myfaces-impl.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/portal-common-lib.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/portal-common-lib.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/portlet-api-lib.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/lib/portlet-api-lib.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/portlet/hello/bean/User.java
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/portlet/hello/bean/User.java	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/main/org/jboss/portlet/hello/bean/User.java	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.portlet.hello.bean;
+
+/**
+ * @author <a href="mailto:roy at jboss.org">Roy Russo</a>
+ */
+public class User
+{
+   String firstname;
+   String lastname;
+   String fullname;
+
+   public String getLastname()
+   {
+      return lastname;
+   }
+
+   public void setLastname(String lastname)
+   {
+      this.lastname = lastname;
+   }
+
+   public String getFirstname()
+   {
+      return firstname;
+   }
+
+   public void setFirstname(String firstname)
+   {
+      this.firstname = firstname;
+   }
+
+   public String getFullname()
+   {
+      return fullname;
+   }
+
+   public void setFullname(String fullname)
+   {
+      this.fullname = fullname;
+   }
+
+   public String concatenateNames()
+   {
+      setFullname(firstname + " " + lastname);
+      return "done";
+   }
+}

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/faces-config.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/faces-config.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/faces-config.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC
+   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+   "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+   <managed-bean>
+      <description>Basic UserBean</description>
+      <managed-bean-name>user</managed-bean-name>
+      <managed-bean-class>org.jboss.portlet.hello.bean.User</managed-bean-class>
+      <managed-bean-scope>session</managed-bean-scope>
+   </managed-bean>
+
+   <navigation-rule>
+      <navigation-case>
+         <from-outcome>done</from-outcome>
+         <to-view-id>/WEB-INF/jsp/result.jsp</to-view-id>
+      </navigation-case>
+   </navigation-rule>
+</faces-config>
\ No newline at end of file

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/helloworld-object.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/helloworld-object.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/helloworld-object.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployments>
+   <deployment>
+      <if-exists>overwrite</if-exists>
+      <parent-ref>default.default</parent-ref>
+      <window>
+         <window-name>HelloWorldJSFPortletWindow</window-name>
+         <instance-ref>HelloWorldJSFPortletInstance</instance-ref>
+         <region>center</region>
+         <height>1</height>
+      </window>
+   </deployment>
+</deployments>

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/index.jsp
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/index.jsp	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/index.jsp	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,17 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<f:view>
+   <div align="center">
+      <h:form>
+         <h:panelGrid columns="2">
+            <h:outputText styleClass="portlet-font" value="First Name:"/>
+            <h:inputText value="#{user.firstname}" required="true"/>
+            <h:outputText styleClass="portlet-font" value="Last Name:"/>
+            <h:inputText value="#{user.lastname}" required="true"/>
+         </h:panelGrid>
+         <br/>
+         <h:commandButton action="#{user.concatenateNames}" value="Next"/>
+      </h:form>
+   </div>
+</f:view>

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/result.jsp
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/result.jsp	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/jsp/result.jsp	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,8 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<f:view>
+   <div align="center">
+      <h:outputText styleClass="portlet-font" value="Hello, #{user.fullname}"/>
+   </div>
+</f:view>
\ No newline at end of file

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet-instances.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet-instances.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet-instances.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,9 @@
+<?xml version="1.0" standalone="yes"?>
+<deployments>
+   <deployment>
+      <instance>
+         <instance-id>HelloWorldJSFPortletInstance</instance-id>
+         <portlet-ref>HelloWorldJSFPortlet</portlet-ref>
+      </instance>
+   </deployment>
+</deployments>

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/portlet.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             version="1.0">
+   <portlet>
+      <portlet-name>HelloWorldJSFPortlet</portlet-name>
+      <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
+      <init-param>
+         <name>default-view</name>
+         <value>/WEB-INF/jsp/index.jsp</value>
+      </init-param>
+      <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+      </supports>
+      <portlet-info>
+         <title>HelloWorld JSF Portlet</title>
+      </portlet-info>
+   </portlet>
+</portlet-app>

Added: portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/web.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/web.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFMyFacesPortlet/src/resources/helloworldjsfmyfacesportlet-war/WEB-INF/web.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+</web-app>

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/README.txt
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/README.txt	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/README.txt	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,8 @@
+This portlet uses JSF as a rendering technology.
+
+1. Deploy the helloworldjsfsunriportlet.war (you may hot-deploy it.) by copying it to the portal's deploy directory, normally under JBOSS_HOME/server/default/deploy/*
+
+- This download bundle already includes the deployable portlet under, HelloWorldJSFSunRIPortlet\output\lib\helloworldjsfsunriportlet.war
+
+It will work in JBoss AS having the JSF Sun RI bundled (true for JBoss 4.2.1, not by default for 4.0.5)
+

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/build.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/build.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/build.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,90 @@
+<project name="JBoss HelloWorld JSF Sun RI Portlet"
+         default="deploy"
+         basedir=".">
+
+   <property name="app.name" value="helloworldjsfsunriportlet"/>
+
+   <property name="src.dir" value="${basedir}/src"/>
+
+   <property name="lib.dir" value="${basedir}/lib"/>
+
+   <property name="build.dir" value="${basedir}/output"/>
+
+   <property name="build.lib" value="${build.dir}/lib"/>
+
+   <property name="build.resources" value="${src.dir}/resources"/>
+
+   <property name="build.etc" value="${src.dir}/etc"/>
+
+   <property name="classes.dir" value="${build.dir}/classes"/>
+
+   <property name="dist.dir" value="${src.dir}/resources"/>
+
+   <property name="libs.api" value="${lib.dir}/portlet-api-lib.jar"/>
+
+   <property name="libs.ant"
+             value="${lib.dir}/explode.jar;${lib.dir}/portal-common-lib.jar;${lib.dir}/portal-core-lib.jar"/>
+
+   <property name="libs" value="${libs.api};${libs.ant}"/>
+
+   <available property="clover.available" classname="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+
+   <target name="clover-yes" depends="prepare" if="clover.available">
+      <property name="compiler" value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+   </target>
+
+   <target name="clover-no" depends="prepare" unless="clover.available">
+      <property name="compiler" value="modern"/>
+   </target>
+
+   <target name="prepare">
+      <mkdir dir="${classes.dir}"/>
+      <mkdir dir="${build.lib}"/>
+      <mkdir dir="${build.lib}/exploded"/>
+   </target>
+
+   <target name="clean">
+      <delete dir="${build.dir}"/>
+   </target>
+
+   <target name="deploy" depends="clover-yes, clover-no">
+      <javac srcdir="${src.dir}"
+             destdir="${classes.dir}"
+             classpath="${libs}"
+             debug="off"
+             optimize="on"
+             deprecation="on"
+             compiler="${compiler}"
+            >
+         <include name="main/org/jboss/portlet/**/*.java"/>
+      </javac>
+
+      <!-- helloworldjsfportlet-lib.jar -->
+      <jar jarfile="${build.lib}/helloworldjsfsunriportlet-lib.jar">
+         <fileset dir="${classes.dir}"/>
+      </jar>
+
+      <mkdir dir="${build.resources}/helloworldjsfsunriportlet-war/WEB-INF/lib"/>
+      <copy file="${build.lib}/helloworldjsfsunriportlet-lib.jar"
+            todir="${build.resources}/helloworldjsfsunriportlet-war/WEB-INF/lib"/>
+
+      <copy file="${lib.dir}/jsf-portlet.jar"
+            todir="${build.resources}/helloworldjsfsunriportlet-war/WEB-INF/lib"/>
+      <!-- helloworldjsfportlet.war -->
+      <jar jarfile="helloworldjsfsunriportlet.war">
+         <fileset dir="${build.resources}/helloworldjsfsunriportlet-war"/>
+      </jar>
+   </target>
+
+   <target name="explode" depends="deploy">
+      <taskdef classname="org.jboss.portal.common.ant.Explode"
+               name="explode"
+               classpath="${libs}"/>
+      <explode
+            file="helloworldjsfsunriportlet.war"
+            todir="${build.lib}/exploded"
+            name="helloworldjsfsunriportlet.war"/>
+   </target>
+   <target name="all" depends="deploy"/>
+</project>
+

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/helloworldjsfsunriportlet.war
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFSunRIPortlet/helloworldjsfsunriportlet.war
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/explode.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/explode.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/jsf-portlet.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/jsf-portlet.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/portal-common-lib.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/portal-common-lib.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/portlet-api-lib.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFSunRIPortlet/lib/portlet-api-lib.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/hello/bean/User.java
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/hello/bean/User.java	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/hello/bean/User.java	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.portlet.hello.bean;
+
+/**
+ * @author <a href="mailto:roy at jboss.org">Roy Russo</a>
+ */
+public class User
+{
+   String firstname;
+   String lastname;
+   String fullname;
+
+   public String getLastname()
+   {
+      return lastname;
+   }
+
+   public void setLastname(String lastname)
+   {
+      this.lastname = lastname;
+   }
+
+   public String getFirstname()
+   {
+      return firstname;
+   }
+
+   public void setFirstname(String firstname)
+   {
+      this.firstname = firstname;
+   }
+
+   public String getFullname()
+   {
+      return fullname;
+   }
+
+   public void setFullname(String fullname)
+   {
+      this.fullname = fullname;
+   }
+
+   public String concatenateNames()
+   {
+      setFullname(firstname + " " + lastname);
+      return "done";
+   }
+}

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/faces-config.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/faces-config.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/faces-config.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC
+   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+   "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+   <managed-bean>
+      <description>Basic UserBean</description>
+      <managed-bean-name>user</managed-bean-name>
+      <managed-bean-class>org.jboss.portlet.hello.bean.User</managed-bean-class>
+      <managed-bean-scope>session</managed-bean-scope>
+   </managed-bean>
+
+   <navigation-rule>
+      <navigation-case>
+         <from-outcome>done</from-outcome>
+         <to-view-id>/WEB-INF/jsp/result.jsp</to-view-id>
+      </navigation-case>
+   </navigation-rule>
+</faces-config>
\ No newline at end of file

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/helloworld-object.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/helloworld-object.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/helloworld-object.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployments>
+   <deployment>
+      <if-exists>overwrite</if-exists>
+      <parent-ref>default.default</parent-ref>
+      <window>
+         <window-name>HelloWorldJSFPortletWindow</window-name>
+         <instance-ref>HelloWorldJSFPortletInstance</instance-ref>
+         <region>center</region>
+         <height>1</height>
+      </window>
+   </deployment>
+</deployments>

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/index.jsp
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/index.jsp	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/index.jsp	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,17 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<f:view>
+   <div align="center">
+      <h:form>
+         <h:panelGrid columns="2">
+            <h:outputText styleClass="portlet-font" value="First Name:"/>
+            <h:inputText value="#{user.firstname}" required="true"/>
+            <h:outputText styleClass="portlet-font" value="Last Name:"/>
+            <h:inputText value="#{user.lastname}" required="true"/>
+         </h:panelGrid>
+         <br/>
+         <h:commandButton action="#{user.concatenateNames}" value="Next"/>
+      </h:form>
+   </div>
+</f:view>

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/result.jsp
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/result.jsp	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/jsp/result.jsp	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,8 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<f:view>
+   <div align="center">
+      <h:outputText styleClass="portlet-font" value="Hello, #{user.fullname}"/>
+   </div>
+</f:view>
\ No newline at end of file

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/lib/jsf-portlet.jar
===================================================================
(Binary files differ)


Property changes on: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/lib/jsf-portlet.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet-instances.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet-instances.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet-instances.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,9 @@
+<?xml version="1.0" standalone="yes"?>
+<deployments>
+   <deployment>
+      <instance>
+         <instance-id>HelloWorldJSFPortletInstance</instance-id>
+         <portlet-ref>HelloWorldJSFPortlet</portlet-ref>
+      </instance>
+   </deployment>
+</deployments>

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/portlet.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             version="1.0">
+   <portlet>
+      <portlet-name>HelloWorldJSFPortlet</portlet-name>
+      <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
+      <init-param>
+         <name>com.sun.faces.portlet.INIT_VIEW</name>
+         <value>/WEB-INF/jsp/index.jsp</value>
+      </init-param>
+      <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+      </supports>
+      <portlet-info>
+         <title>HelloWorld JSF Portlet</title>
+      </portlet-info>
+   </portlet>
+</portlet-app>

Added: portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/web.xml
===================================================================
--- portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/web.xml	                        (rev 0)
+++ portlets/2_6/src/HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/web.xml	2007-08-28 14:38:49 UTC (rev 139)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+ <context-param>
+        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+        <param-value>client</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>javax.faces.application.CONFIG_FILES</param-name>
+        <param-value>/WEB-INF/faces-config.xml</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>com.sun.faces.validateXml</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <!-- Faces Servlet -->
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+
+    <!-- Faces Servlet Mapping -->
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.jsf</url-pattern>
+    </servlet-mapping>
+
+</web-app>




More information about the jboss-svn-commits mailing list