diff --git a/SWF-1468/pom.xml b/SWF-1468/pom.xml new file mode 100644 index 0000000..ffc1707 --- /dev/null +++ b/SWF-1468/pom.xml @@ -0,0 +1,218 @@ + + 4.0.0 + org.springframework.webflow.issues + SWF-1468 + 1.0-SNAPSHOT + Spring Web Flow and JSF Issue Reproduction Project + war + + + 1.6 + 2.3.1.BUILD-SNAPSHOT + 3.1.1.RELEASE + 3.0.7.RELEASE + 2.1.7 + 1.6.1 + + + + + + org.springframework + spring-context + ${org.springframework-version} + + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + ${org.springframework-version} + + + + + org.springframework.webflow + spring-faces + ${org.springwebflow-version} + + + + + com.sun.faces + jsf-api + ${jsf-version} + + + com.sun.faces + jsf-impl + ${jsf-version} + + + + + + + org.slf4j + slf4j-api + ${org.slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j-version} + runtime + + + org.slf4j + slf4j-log4j12 + ${org.slf4j-version} + runtime + + + log4j + log4j + 1.2.16 + runtime + + + + + javax.servlet + servlet-api + 2.5 + provided + + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + + + javax.validation + validation-api + 1.0.0.GA + + + + org.hibernate + hibernate-validator + 4.1.0.Final + + + + + + + junit + junit + 4.8 + test + + + + + + + + spring-related-snapshot-releases + Latest Spring Snapshot Repository + http://maven.springframework.org/snapshot + false + true + + + + + + + + maven-compiler-plugin + + ${java-version} + ${java-version} + + + + org.apache.maven.plugins + maven-dependency-plugin + + + install + install + + sources + + + + + + maven-surefire-plugin + + + **/*Tests.java + + + **/*Abstract*.java + + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.8 + + true + false + 2.0 + + + + + + + diff --git a/SWF-1468/src/main/resources/log4j.properties b/SWF-1468/src/main/resources/log4j.properties new file mode 100644 index 0000000..c3e60f2 --- /dev/null +++ b/SWF-1468/src/main/resources/log4j.properties @@ -0,0 +1,10 @@ +log4j.rootCategory=INFO, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n + +log4j.category.org.springframework.binding=DEBUG +log4j.category.org.springframework.web=DEBUG +log4j.category.org.springframework.webflow=DEBUG +log4j.category.org.springframework.js=DEBUG \ No newline at end of file diff --git a/SWF-1468/src/main/webapp/WEB-INF/faces-config.xml b/SWF-1468/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..d143ffb --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,7 @@ + + + + diff --git a/SWF-1468/src/main/webapp/WEB-INF/layouts/standard.xhtml b/SWF-1468/src/main/webapp/WEB-INF/layouts/standard.xhtml new file mode 100644 index 0000000..7cd3c96 --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/layouts/standard.xhtml @@ -0,0 +1,15 @@ + + + + + + Spring Web Flow and JSF Issue Project + + + + + + diff --git a/SWF-1468/src/main/webapp/WEB-INF/myflow/myflow.xml b/SWF-1468/src/main/webapp/WEB-INF/myflow/myflow.xml new file mode 100644 index 0000000..22a41fc --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/myflow/myflow.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/SWF-1468/src/main/webapp/WEB-INF/myflow/view.xhtml b/SWF-1468/src/main/webapp/WEB-INF/myflow/view.xhtml new file mode 100755 index 0000000..0e6850f --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/myflow/view.xhtml @@ -0,0 +1,20 @@ + + + +
+

My Page

+ +

Line before onzintag

+

+

Line after onzintag

+ +
+
+
+
\ No newline at end of file diff --git a/SWF-1468/src/main/webapp/WEB-INF/spring/root-context.xml b/SWF-1468/src/main/webapp/WEB-INF/spring/root-context.xml new file mode 100644 index 0000000..faac234 --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/spring/root-context.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/SWF-1468/src/main/webapp/WEB-INF/spring/servlet-context.xml b/SWF-1468/src/main/webapp/WEB-INF/spring/servlet-context.xml new file mode 100644 index 0000000..9f90b12 --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/spring/servlet-context.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SWF-1468/src/main/webapp/WEB-INF/spring/webflow.xml b/SWF-1468/src/main/webapp/WEB-INF/spring/webflow.xml new file mode 100644 index 0000000..57f1195 --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/spring/webflow.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SWF-1468/src/main/webapp/WEB-INF/views/index.xhtml b/SWF-1468/src/main/webapp/WEB-INF/views/index.xhtml new file mode 100755 index 0000000..2987862 --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/views/index.xhtml @@ -0,0 +1,15 @@ + + + +
+

Home

+

See server log for debug information

+
+ Start Flow +
+
+
\ No newline at end of file diff --git a/SWF-1468/src/main/webapp/WEB-INF/web.xml b/SWF-1468/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..bace44b --- /dev/null +++ b/SWF-1468/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,78 @@ + + + + + contextConfigLocation + /WEB-INF/spring/root-context.xml + + + + org.springframework.web.context.ContextLoaderListener + + + + + javax.faces.DEFAULT_SUFFIX + .xhtml + + + + + javax.faces.PROJECT_STAGE + Development + + + + + javax.faces.FACELETS_REFRESH_PERIOD + 1 + + + + + + + + appServlet + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + /WEB-INF/spring/servlet-context.xml + + 2 + + + + appServlet + /main/* + + + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + + main/index.html + + + diff --git a/SWF-1468/src/main/webapp/resources/onzin/onzintag.xhtml b/SWF-1468/src/main/webapp/resources/onzin/onzintag.xhtml new file mode 100644 index 0000000..ed25898 --- /dev/null +++ b/SWF-1468/src/main/webapp/resources/onzin/onzintag.xhtml @@ -0,0 +1,11 @@ + + + + + + + ONZIN + + + diff --git a/SWF-1468/src/test/java/org/springframework/webflow/issues/MyFlowExecutionTests.java b/SWF-1468/src/test/java/org/springframework/webflow/issues/MyFlowExecutionTests.java new file mode 100644 index 0000000..035aa3c --- /dev/null +++ b/SWF-1468/src/test/java/org/springframework/webflow/issues/MyFlowExecutionTests.java @@ -0,0 +1,47 @@ +package org.springframework.webflow.issues; + +import org.springframework.webflow.config.FlowDefinitionResource; +import org.springframework.webflow.config.FlowDefinitionResourceFactory; +import org.springframework.webflow.core.collection.LocalAttributeMap; +import org.springframework.webflow.core.collection.MutableAttributeMap; +import org.springframework.webflow.test.MockExternalContext; +import org.springframework.webflow.test.MockFlowBuilderContext; +import org.springframework.webflow.test.execution.AbstractXmlFlowExecutionTests; + +public class MyFlowExecutionTests extends AbstractXmlFlowExecutionTests { + + @Override + protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) { + return resourceFactory.createFileResource("src/main/webapp/WEB-INF/myflow/myflow.xml"); + } + + @Override + protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext) { + // Register beans here.. + // MyService myService = ... ; + // builderContext.registerBean("myService", myService); + } + + public void testStartFlow() { + + MutableAttributeMap input = new LocalAttributeMap(); + MockExternalContext context = new MockExternalContext(); + + startFlow(input, context); + + assertCurrentStateEquals("view"); + assertResponseWrittenEquals("view", context); + } + + public void testEndFlow() { + setCurrentState("view"); + + MockExternalContext context = new MockExternalContext(); + context.setEventId("continue"); + resumeFlow(context); + + assertFlowExecutionEnded(); + assertFlowExecutionOutcomeEquals("done"); + } + +} diff --git a/SWF-1468/src/test/resources/log4j.properties b/SWF-1468/src/test/resources/log4j.properties new file mode 100644 index 0000000..eff60e8 --- /dev/null +++ b/SWF-1468/src/test/resources/log4j.properties @@ -0,0 +1,10 @@ +log4j.rootCategory=INFO, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n + +log4j.category.org.springframework.binding=DEBUG +log4j.category.org.springframework.web=DEBUG +log4j.category.org.springframework.webflow=DEBUG +log4j.category.org.springframework.js=DEBUG