Permalink
Browse files

Add SWF-JSF-0000 template project, README.markdown

  • Loading branch information...
1 parent dd9529f commit 36c9f9ded47b7a18072f39147356dc01c74dd87c @rstoyanchev rstoyanchev committed Dec 16, 2011
Showing with 877 additions and 16 deletions.
  1. +90 −0 README.markdown
  2. +3 −10 SWF-0000/README.txt
  3. +7 −5 SWF-0000/src/main/webapp/WEB-INF/phonebook/showNumbers.jsp
  4. +3 −1 SWF-0000/src/main/webapp/WEB-INF/views/home.jsp
  5. +45 −0 SWF-0000/src/test/java/org/springframework/webflow/issues/PhonebookFlowExecutionTests.java
  6. +10 −0 SWF-JSF-0000/README.txt
  7. +236 −0 SWF-JSF-0000/pom.xml
  8. +10 −0 SWF-JSF-0000/src/main/resources/log4j.properties
  9. +7 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/faces-config.xml
  10. +11 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/all-wcprops
  11. +6 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/dir-prop-base
  12. +62 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/entries
  13. +63 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/.svn/text-base/standard.xhtml.svn-base
  14. +14 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/layouts/standard.xhtml
  15. +14 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/phonebook/phonebook-flow.xml
  16. +21 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/phonebook/showNumbers.xhtml
  17. +10 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/spring/root-context.xml
  18. +46 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/spring/servlet-context.xml
  19. +35 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/spring/webflow.xml
  20. +15 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/views/index.xhtml
  21. +78 −0 SWF-JSF-0000/src/main/webapp/WEB-INF/web.xml
  22. +45 −0 SWF-JSF-0000/src/test/java/org/springframework/webflow/issues/PhonebookFlowExecutionTests.java
  23. +10 −0 SWF-JSF-0000/src/test/resources/log4j.properties
  24. +36 −0 create-repro-project.sh
View
@@ -0,0 +1,90 @@
+## Welcome!
+
+This repository contains mini projects reproducing issues logged in Spring Web Flow's [issue tracker|https://jira.springsource.org]. There are many reasons why this is better than .zip or patch file attachments:
+
+* A streamlined process for evaluating issues so more bugs get fixed more quickly!
+* Two-way communication with the Spring team based on working code
+* A set of template projects to choose from
+* Improved code sharing across the Spring team
+* A valuable archive of Spring Web Flow projects across a wide range of use cases and features
+
+All around a better way of interacting with the Spring team.
+
+
+## Logging an issue against Spring Web Flow's JIRA issue tracker
+
+1. First, [search SWF JIRA](https://jira.springframework.org/browse/SWF) to see if your issue has already been reported. If so, there may already be a reproduction issue in this repository!
+1. If after verifying the issue doesn't exist, [create a new issue](https://jira.springsource.org/secure/CreateIssue!default.jspa)
+ * You will now have an issue named, for example, "SWF-1502". Make note of this, as you'll need it below when creating your project.
+
+
+## Using this repository to demonstrate the issue
+
+Assuming you've encountered and created an issue in the core Spring Web Flow project you can now add a project to demonstrate it.
+
+### First-time setup
+
+1. [Create a Github account](https://github.com/signup/free) if you don't already have one
+1. [Fork this repository and clone it locally](http://help.github.com/fork-a-repo/)
+
+### Create a project that reproduces your issue
+
+The idea is to create the smallest possible project to demonstrate the issue. The project may be built with Maven and must contain only sources, XML and other necessary text files. No JARs, please!
+
+For the purpose of these instructions, we'll assume your new JIRA issue ID is "SWF-1502"
+
+#### Steps
+
+1\. In your local clone of this repository, create a copy of the appopriate 'template' directory. Their names start with `SWF-0000`.
+
+For Spring Web Flow (non-JSF) issues:
+
+```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
+```
+
+2\. Review the list of dependencies and version numbers and modify the pom.xml as necessary.
+
+
+3\. Import the project into your IDE and modify it as necessary to reproduce your issue.
+
+* It is already a buildable Maven project, so you may use your IDE's built-in support for Maven to do the importing or generate them before importing (e.g. `mvn eclipse:eclipse`).
+
+4\. Add, commit, and push your local fork
+
+```bash
+git add SPR-1502
+git commit -m "Add repro project for SPR-1502"
+git push
+```
+
+5\. [Send a pull request from the Github web interface](http://help.github.com/send-pull-requests/)
+
+* The Spring Web Flow team will be notified and will look at your request
+
+... and that's it!
+
+## FAQ
+
+### What if my issue is not a bug, but an improvement or new feature request?
+
+In certain cases, it may make sense to submit a project for improvement requests. Feel free to submit a project here for your issue if you think it will help us to understand the scenario better.
+
+### What about patches against Spring Web Flow itself? Should I still attach those to my JIRA issue?
+
+For now, yes. Spring Web Flow will move from it's current home in SVN to Github soon -- when that happens, we may consider pull requests against forks of that repository.
+
+### Can I still attach .zip files to my JIRA issue? Is it required to use this repository?
+
+Yes, you may still attach zip files if it works best for you. Submitting pull requests against this repository as described above is the mechanism that the Spring Web Flow team prefers, but what's most important is that we get code from you that reproduces the problem! Please consider this approach, but zip files are still OK.
+
View
@@ -1,17 +1,10 @@
This is a simple template for creating issue reproduction projects per
the README.markdown file in the root of this repository (and at
-https://github.com/cbeams/spring-framework-issues#readme). Please read
-that document completely before starting.
+https://github.com/SpringSource/spring-webflow-issues#readme).
+Please read that document completely before starting.
As described at the link above, copy this project to a new directory
having the same name as the JIRA issue you're trying to reproduce and
edit from there.
-Both Gradle (build.gradle) and Maven (pom.xml) build scripts are
-included for your convenience and choice. Once you've created your
-copy of this directory, delete whichever build script you don't wish
-to use, and then edit the remaining one to suit your needs.
-
-Note that this project contains a log4j.properties file in
-src/test/resources that you may wish to configure to emit more detailed
-logging. The log level for org.springframework is set to WARN by default.
+A Maven (pom.xml) build script is included for your convenience.
@@ -10,10 +10,12 @@
<body>
<h1>Phone Numbers</h1>
<hr>
- <p>(917) 455-3605</p>
- <p>(347) 219-2216</p>
- <p>
- <a href="${flowExecutionUrl}&_eventId=continue">End Flow</a>
- </p>
+ <form action="${flowExecutionUrl}" method="post">
+ <p>(917) 455-3605</p>
+ <p>(347) 219-2216</p>
+ <p>
+ <button type="submit" name="_eventId_continue">End Flow</button>
+ </p>
+ </form>
</body>
</html>
@@ -9,6 +9,8 @@
</head>
<body>
<h1>Home</h1>
- <hr><a href="phonebook">Start Flow</a>
+ <p><em>See the server output for debug information</em></p>
+ <hr>
+ <p><a href="phonebook">Start Flow</a></p>
</body>
</html>
@@ -0,0 +1,45 @@
+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 PhonebookFlowExecutionTests extends AbstractXmlFlowExecutionTests {
+
+ @Override
+ protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) {
+ return resourceFactory.createFileResource("src/main/webapp/WEB-INF/phonebook/phonebook-flow.xml");
+ }
+
+ @Override
+ protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext) {
+ // register beans -- e.g. builderContext.registerBean("phoneService", phoneService);
+ }
+
+ public void testStartFlow() {
+
+ MutableAttributeMap input = new LocalAttributeMap();
+ MockExternalContext context = new MockExternalContext();
+
+ startFlow(input, context);
+
+ assertCurrentStateEquals("showNumbers");
+ assertResponseWrittenEquals("showNumbers", context);
+ }
+
+ public void testEndFlow() {
+ setCurrentState("showNumbers");
+
+ MockExternalContext context = new MockExternalContext();
+ context.setEventId("continue");
+ resumeFlow(context);
+
+ assertFlowExecutionEnded();
+ assertFlowExecutionOutcomeEquals("done");
+ }
+
+}
View
@@ -0,0 +1,10 @@
+This is a simple template for creating issue reproduction projects per
+the README.markdown file in the root of this repository (and at
+https://github.com/SpringSource/spring-webflow-issues#readme).
+Please read that document completely before starting.
+
+As described at the link above, copy this project to a new directory
+having the same name as the JIRA issue you're trying to reproduce and
+edit from there.
+
+A Maven (pom.xml) build script is included for your convenience.
Oops, something went wrong.

0 comments on commit 36c9f9d

Please sign in to comment.