Permalink
Browse files

Add richfaces and primefaces project templates

  • Loading branch information...
1 parent a3a4e93 commit 60796e99e2e8817af6fd4f01ac271eb4fcdcb3bc @rstoyanchev rstoyanchev committed Feb 29, 2012
Showing with 1,166 additions and 267 deletions.
  1. +2 −8 README.markdown
  2. +218 −0 SWF-0000-jsf/pom.xml
  3. 0 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/resources/log4j.properties
  4. 0 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/webapp/WEB-INF/faces-config.xml
  5. +1 −1 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/webapp/WEB-INF/layouts/standard.xhtml
  6. +4 −5 ...app/WEB-INF/phonebook/phonebook-flow.xml → SWF-0000-jsf/src/main/webapp/WEB-INF/myflow/myflow.xml
  7. +4 −7 ...bapp/WEB-INF/phonebook/showNumbers.xhtml → SWF-0000-jsf/src/main/webapp/WEB-INF/myflow/view.xhtml
  8. 0 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/webapp/WEB-INF/spring/root-context.xml
  9. +3 −1 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/webapp/WEB-INF/spring/servlet-context.xml
  10. +2 −2 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/webapp/WEB-INF/spring/webflow.xml
  11. +2 −2 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/webapp/WEB-INF/views/index.xhtml
  12. 0 {SWF-JSF-0000 → SWF-0000-jsf}/src/main/webapp/WEB-INF/web.xml
  13. +8 −6 ...ts.java → SWF-0000-jsf/src/test/java/org/springframework/webflow/issues/MyFlowExecutionTests.java
  14. 0 {SWF-JSF-0000 → SWF-0000-jsf}/src/test/resources/log4j.properties
  15. +8 −0 SWF-0000-primefaces/README.txt
  16. +234 −0 SWF-0000-primefaces/pom.xml
  17. +10 −0 SWF-0000-primefaces/src/main/resources/log4j.properties
  18. +7 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/faces-config.xml
  19. +15 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/layouts/standard.xhtml
  20. +13 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/myflow/myflow.xml
  21. +21 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/myflow/view.xhtml
  22. +8 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/spring/root-context.xml
  23. +48 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/spring/servlet-context.xml
  24. +35 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/spring/webflow.xml
  25. +15 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/views/index.xhtml
  26. +78 −0 SWF-0000-primefaces/src/main/webapp/WEB-INF/web.xml
  27. +8 −6 ... → SWF-0000-primefaces/src/test/java/org/springframework/webflow/issues/MyFlowExecutionTests.java
  28. +10 −0 SWF-0000-primefaces/src/test/resources/log4j.properties
  29. +8 −0 SWF-0000-richfaces/README.txt
  30. +15 −36 {SWF-JSF-0000 → SWF-0000-richfaces}/pom.xml
  31. +10 −0 SWF-0000-richfaces/src/main/resources/log4j.properties
  32. +7 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/faces-config.xml
  33. +15 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/layouts/standard.xhtml
  34. +13 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/myflow/myflow.xml
  35. +22 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/myflow/view.xhtml
  36. +8 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/spring/root-context.xml
  37. +58 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/spring/servlet-context.xml
  38. +35 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/spring/webflow.xml
  39. +15 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/views/index.xhtml
  40. +78 −0 SWF-0000-richfaces/src/main/webapp/WEB-INF/web.xml
  41. +47 −0 SWF-0000-richfaces/src/test/java/org/springframework/webflow/issues/MyFlowExecutionTests.java
  42. +10 −0 SWF-0000-richfaces/src/test/resources/log4j.properties
  43. +6 −8 SWF-0000/README.txt
  44. +5 −18 SWF-0000/pom.xml
  45. +1 −1 SWF-0000/src/main/webapp/WEB-INF/{phonebook/phonebook-flow.xml → myflow/myflow.xml}
  46. +4 −4 SWF-0000/src/main/webapp/WEB-INF/{phonebook/showNumbers.jsp → myflow/view.jsp}
  47. +6 −8 SWF-0000/src/main/webapp/WEB-INF/spring/webflow.xml
  48. +2 −2 SWF-0000/src/main/webapp/WEB-INF/views/home.jsp
  49. +47 −0 SWF-0000/src/test/java/org/springframework/webflow/issues/MyFlowExecutionTests.java
  50. +0 −10 SWF-JSF-0000/README.txt
  51. +0 −11 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/all-wcprops
  52. +0 −6 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/dir-prop-base
  53. +0 −62 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/entries
  54. +0 −63 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/text-base/standard.xhtml.svn-base
View
@@ -38,21 +38,15 @@ For the purpose of these instructions, we'll assume your new JIRA issue ID is "S
1\. In your local clone of this repository, create a copy of the appopriate template sub-directory. Their names start with `SWF-0000`.
-For Spring Web Flow (non-JSF) issues:
+For example:
```bash
$ cd spring-webflow-issues
$ ./create-repro-project.sh SWF-0000/ SPR-1502
$ cd SPR-1502
```
-For Spring Web Flow with JSF 2 issues:
-
-```bash
-$ cd spring-webflow-issues
-$ ./create-repro-project.sh SWF-JSF-0000/ SPR-1502
-$ cd SPR-1502
-```
+Also available are `SWF-0000-primefaces`, `SWF-0000-richfaces`, and `SWF-0000-jsf`.
2\. Review the list of dependencies and version numbers and modify the pom.xml as necessary.
View
@@ -0,0 +1,218 @@
+<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>org.springframework.webflow.issues</groupId>
+ <artifactId>SWF-0000-jsf</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Spring Web Flow and JSF Issue Reproduction Project</name>
+ <packaging>war</packaging>
+
+ <properties>
+ <java-version>1.6</java-version>
+ <org.springwebflow-version>2.3.1.BUILD-SNAPSHOT</org.springwebflow-version>
+ <org.springframework-version>3.1.1.RELEASE</org.springframework-version>
+ <org.springsecurity-version>3.0.7.RELEASE</org.springsecurity-version>
+ <jsf-version>2.1.7</jsf-version>
+ <org.slf4j-version>1.6.1</org.slf4j-version>
+ </properties>
+
+ <dependencies>
+ <!-- Spring Framework -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${org.springframework-version}</version>
+ <exclusions>
+ <!-- Exclude Commons Logging in favor of SLF4j -->
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+
+ <!-- Spring Web Flow -->
+ <dependency>
+ <groupId>org.springframework.webflow</groupId>
+ <artifactId>spring-faces</artifactId>
+ <version>${org.springwebflow-version}</version>
+ </dependency>
+
+ <!-- JSF -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>${jsf-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>${jsf-version}</version>
+ </dependency>
+
+ <!-- Spring Security
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ <version>${org.springsecurity-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-taglibs</artifactId>
+ <version>${org.springsecurity-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-config</artifactId>
+ <version>${org.springsecurity-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ -->
+
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${org.slf4j-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${org.slf4j-version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j-version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Servlet API, JSP API, JSTL -->
+ <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>
+
+ <!-- Bean Validation with the Hibernate Validator implementation -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.1.0.Final</version>
+ </dependency>
+
+ <!-- JAXB for Hibernate Validator when running on Java 5
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ -->
+
+ <!-- JUnit -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <repositories>
+
+ <repository>
+ <id>spring-related-snapshot-releases</id>
+ <name>Latest Spring Snapshot Repository</name>
+ <url>http://maven.springframework.org/snapshot</url>
+ <releases><enabled>false</enabled></releases>
+ <snapshots><enabled>true</enabled></snapshots>
+ </repository>
+
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java-version}</source>
+ <target>${java-version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install</id>
+ <phase>install</phase>
+ <goals>
+ <goal>sources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/*Abstract*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>false</downloadJavadocs>
+ <wtpversion>2.0</wtpversion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
@@ -6,7 +6,7 @@
<f:view contentType="text/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>SWF-JSF Test App</title>
+ <title>Spring Web Flow and JSF Issue Project</title>
</h:head>
<body>
<ui:insert name="content" />
@@ -2,13 +2,12 @@
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
- http://www.springframework.org/schema/webflow
- http://www.springframework.org/schema/webflow/spring-webflow.xsd">
-
- <view-state id="showNumbers">
+ http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
+
+ <view-state id="view">
<transition on="continue" to="done" />
</view-state>
-
+
<end-state id="done" view="externalRedirect:contextRelative:/" />
</flow>
@@ -7,14 +7,11 @@
template="/WEB-INF/layouts/standard.xhtml">
<ui:define name="content">
<div>
- <h1>Phone Numbers</h1>
- <hr/>
+ <h1>My Page</h1>
<h:form>
- <p>(917) 455-3605</p>
- <p>(347) 219-2216</p>
- <p>
- <h:commandButton id="continue" value="End Flow" action="continue" />
- </p>
+ <p>Line 1</p>
+ <p>Line 2</p>
+ <h:commandButton id="continue" value="End Flow" action="continue" />
</h:form>
</div>
</ui:define>
@@ -8,9 +8,11 @@
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd">
<context:component-scan base-package="org.springframework.webflow.issues" />
-
+
<faces:resources />
+ <bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter"/>
+
<!-- Maps request paths to flows in the flowRegistry -->
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="order" value="1" />
@@ -17,7 +17,7 @@
<!-- The registry with flow definitions -->
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF">
- <webflow:flow-location-pattern value="/**/*-flow.xml" />
+ <webflow:flow-location-pattern value="/**/*flow.xml" />
</webflow:flow-registry>
<!-- Enable the Spring Web Flow JSF integration -->
@@ -32,4 +32,4 @@
<bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener" />
-->
-</beans>
+</beans>
@@ -7,9 +7,9 @@
<ui:define name="content">
<div>
<h1>Home</h1>
- <p><em>See the server output for debug information</em></p>
+ <p><strong>See server log for debug information</strong></p>
<hr />
- <a href="main/phonebook">Start Flow</a>
+ <a href="main/myflow">Start Flow</a>
</div>
</ui:define>
</ui:composition>
@@ -8,16 +8,18 @@
import org.springframework.webflow.test.MockFlowBuilderContext;
import org.springframework.webflow.test.execution.AbstractXmlFlowExecutionTests;
-public class PhonebookFlowExecutionTests extends AbstractXmlFlowExecutionTests {
+public class MyFlowExecutionTests extends AbstractXmlFlowExecutionTests {
@Override
protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) {
- return resourceFactory.createFileResource("src/main/webapp/WEB-INF/phonebook/phonebook-flow.xml");
+ return resourceFactory.createFileResource("src/main/webapp/WEB-INF/myflow/myflow.xml");
}
@Override
protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext) {
- // register beans -- e.g. builderContext.registerBean("phoneService", phoneService);
+ // Register beans here..
+ // MyService myService = ... ;
+ // builderContext.registerBean("myService", myService);
}
public void testStartFlow() {
@@ -27,12 +29,12 @@ public void testStartFlow() {
startFlow(input, context);
- assertCurrentStateEquals("showNumbers");
- assertResponseWrittenEquals("showNumbers", context);
+ assertCurrentStateEquals("view");
+ assertResponseWrittenEquals("view", context);
}
public void testEndFlow() {
- setCurrentState("showNumbers");
+ setCurrentState("view");
MockExternalContext context = new MockExternalContext();
context.setEventId("continue");
@@ -0,0 +1,8 @@
+This is a simple template for creating a project to reproduce
+an issue as described in the README.markdown file in the root
+of this repository (and at
+https://github.com/SpringSource/spring-webflow-issues#readme).
+Please read that document.
+
+A Maven (pom.xml) build script is included for your convenience.
+You may want to customize the dependencies it contains.
Oops, something went wrong. Retry.

0 comments on commit 60796e9

Please sign in to comment.