Author: thomas.heute(a)jboss.com
Date: 2008-07-28 09:07:58 -0400 (Mon, 28 Jul 2008)
New Revision: 11598
Added:
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml
Modified:
examples/trunk/JSFHelloUser/pom.xml
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml
examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp
Log:
A version that works
Modified: examples/trunk/JSFHelloUser/pom.xml
===================================================================
--- examples/trunk/JSFHelloUser/pom.xml 2008-07-28 11:37:13 UTC (rev 11597)
+++ examples/trunk/JSFHelloUser/pom.xml 2008-07-28 13:07:58 UTC (rev 11598)
@@ -10,27 +10,129 @@
<version>0.0.1</version>
<description />
+
+ <build>
+ <finalName>JSFHelloUser</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>
+ </plugins>
+
+ </build>
+
<dependencies>
+
<dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_07</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_07</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+
+ <dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
- <version>2.0</version>
+ <version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.portletbridge</groupId>
<artifactId>portletbridge-api</artifactId>
- <version>1.0.0.B3</version>
+ <version>1.0.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
-
+
<dependency>
<groupId>org.jboss.portletbridge</groupId>
<artifactId>portletbridge-impl</artifactId>
- <version>1.0.0.B3</version>
+ <version>1.0.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
+
</dependencies>
-
+
<repositories>
<repository>
<id>JBoss repository</id>
Added: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml 2008-07-28
13:07:58 UTC (rev 11598)
@@ -0,0 +1,33 @@
+<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">
+
+ <application>
+
<view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
+
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
+ </application>
+
+ <managed-bean>
+ <managed-bean-name>user</managed-bean-name>
+ <managed-bean-class>
+ org.jboss.portal.portlet.samples.jsf.UserBean
+ </managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>sayHello</from-outcome>
+ <to-view-id>/jsf/hello.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>back</from-outcome>
+ <to-view-id>/jsf/welcome.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
Added: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml
(rev 0)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml 2008-07-28 13:07:58
UTC (rev 11598)
@@ -0,0 +1,3 @@
+<jboss-app>
+ <app-name>JSFHelloUser</app-name>
+</jboss-app>
\ No newline at end of file
Modified: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml 2008-07-28 11:37:13 UTC
(rev 11597)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml 2008-07-28 13:07:58 UTC
(rev 11598)
@@ -3,14 +3,37 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd&...
version="2.5">
- <servlet>
- <servlet-name>JSFServlet</servlet-name>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.jsp</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.portlet.faces.renderPolicy</param-name>
+ <param-value>NEVER_DELEGATE</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
</servlet>
-
+
<servlet-mapping>
- <servlet-name>JSFServlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.resource</url-pattern>
+ </servlet-mapping>
+
+
</web-app>
Modified: examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp 2008-07-28 11:37:13 UTC (rev
11597)
+++ examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp 2008-07-28 13:07:58 UTC (rev
11598)
@@ -3,10 +3,12 @@
<f:view>
<portlet:defineObjects/>
-<div class="portlet-section-header">Remember we love you:
<h:outputText value="#{user.userName}"/>}</div>
+<div class="portlet-section-header">Remember we love you:
<h:outputText value="#{user.userName}"/></div>
<br/>
-<h:commandLink action="back">
- <h:outputText value="Ask Me Again"/>
-</h:commandLink>
+<h:form>
+ <h:commandLink action="back">
+ <h:outputText value="Ask Me Again"/>
+ </h:commandLink>
+</h:form>
</f:view>
\ No newline at end of file