forked from spring-projects/spring-webflow-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5883f95
commit 9f1b760
Showing
57 changed files
with
2,207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,285 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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.samples</groupId> | ||
<artifactId>webflow-showcase</artifactId> | ||
<name>Spring Web Flow Showcase</name> | ||
<packaging>war</packaging> | ||
<version>1.0.0-BUILD-SNAPSHOT</version> | ||
|
||
<properties> | ||
<java-version>1.5</java-version> | ||
<springframework-version>3.2.1.RELEASE</springframework-version> | ||
<springwebflow-version>2.4.0.BUILD-SNAPSHOT</springwebflow-version> | ||
<springsecurity-version>3.1.3.RELEASE</springsecurity-version> | ||
<org.slf4j-version>1.5.10</org.slf4j-version> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- Spring --> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-webmvc</artifactId> | ||
<version>${springframework-version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-jdbc</artifactId> | ||
<version>${springframework-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-orm</artifactId> | ||
<version>${springframework-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.webflow</groupId> | ||
<artifactId>spring-webflow</artifactId> | ||
<version>${springwebflow-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.webflow</groupId> | ||
<artifactId>spring-js</artifactId> | ||
<version>${springwebflow-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-web</artifactId> | ||
<version>${springsecurity-version}</version> | ||
<exclusions> | ||
<!-- Exclude Commons Logging in favor of SLF4j --> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-taglibs</artifactId> | ||
<version>${springsecurity-version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-config</artifactId> | ||
<version>${springsecurity-version}</version> | ||
<exclusions> | ||
<!-- Exclude Commons Logging in favor of SLF4j --> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>*</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.15</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>javax.mail</groupId> | ||
<artifactId>mail</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>javax.jms</groupId> | ||
<artifactId>jms</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>com.sun.jdmk</groupId> | ||
<artifactId>jmxtools</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>com.sun.jmx</groupId> | ||
<artifactId>jmxri</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<!-- Database, JPA --> | ||
<dependency> | ||
<groupId>org.hsqldb</groupId> | ||
<artifactId>hsqldb</artifactId> | ||
<version>1.8.0.10</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-entitymanager</artifactId> | ||
<version>3.5.0-Final</version> | ||
</dependency> | ||
<!-- Servlet --> | ||
<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>javax.servlet</groupId> | ||
<artifactId>jstl</artifactId> | ||
<version>1.2</version> | ||
</dependency> | ||
<!-- Apache Tiles --> | ||
<dependency> | ||
<groupId>org.apache.tiles</groupId> | ||
<artifactId>tiles-jsp</artifactId> | ||
<version>2.1.3</version> | ||
<exclusions> | ||
<!-- Exclude Commons Logging in favor of SLF4j --> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging-api</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<!-- JSR 303 with Hibernate Validator --> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-validator</artifactId> | ||
<version>4.1.0.Beta1</version> | ||
</dependency> | ||
<!-- | ||
JAXB is needed when running on Java 5. In this environment these dependencies have to be added | ||
(unless xml configuration is explicitly disabled via Configuration.ignoreXmlConfiguration) | ||
On Java 6 jaxb is part of the runtime environment. | ||
--> | ||
<dependency> | ||
<groupId>javax.xml.bind</groupId> | ||
<artifactId>jaxb-api</artifactId> | ||
<version>2.1</version> | ||
</dependency> | ||
<!-- Joda Time --> | ||
<dependency> | ||
<groupId>joda-time</groupId> | ||
<artifactId>joda-time</artifactId> | ||
<version>1.6</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>joda-time</groupId> | ||
<artifactId>joda-time-jsptags</artifactId> | ||
<version>1.0.2</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<!-- Test --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.7</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<repositories> | ||
<!-- For testing against latest Spring snapshots --> | ||
<repository> | ||
<id>org.springframework.maven.snapshot</id> | ||
<name>Spring Maven Snapshot Repository</name> | ||
<url>http://maven.springframework.org/snapshot</url> | ||
<releases><enabled>false</enabled></releases> | ||
<snapshots><enabled>true</enabled></snapshots> | ||
</repository> | ||
<!-- For developing against latest Spring milestones --> | ||
<repository> | ||
<id>org.springframework.maven.milestone</id> | ||
<name>Spring Maven Milestone Repository</name> | ||
<url>http://maven.springframework.org/milestone</url> | ||
<snapshots><enabled>false</enabled></snapshots> | ||
</repository> | ||
<!-- For Hibernate Validator --> | ||
<repository> | ||
<id>org.jboss.repository.releases</id> | ||
<name>JBoss Maven Release Repository</name> | ||
<url>https://repository.jboss.org/nexus/content/repositories/releases</url> | ||
<snapshots><enabled>false</enabled></snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<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-eclipse-plugin</artifactId> | ||
<version>2.8</version> | ||
<configuration> | ||
<downloadSources>true</downloadSources> | ||
<downloadJavadocs>false</downloadJavadocs> | ||
<wtpversion>2.0</wtpversion> | ||
<sourceExcludes> | ||
<sourceExclude>**/.svn/**</sourceExclude> | ||
</sourceExcludes> | ||
</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> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>tomcat-maven-plugin</artifactId> | ||
<version>1.0-beta-1</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd"> | ||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | ||
|
||
<!-- Appenders --> | ||
<appender name="console" class="org.apache.log4j.ConsoleAppender"> | ||
<param name="Target" value="System.out" /> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<param name="ConversionPattern" value="%-5p: %c - %m%n" /> | ||
</layout> | ||
</appender> | ||
|
||
<!-- Application Loggers --> | ||
<logger name="org.springframework.samples.webflow"> | ||
<level value="debug" /> | ||
</logger> | ||
|
||
<!-- 3rdparty Loggers --> | ||
<logger name="org.springframework.core"> | ||
<level value="info" /> | ||
</logger> | ||
|
||
<logger name="org.springframework.beans"> | ||
<level value="info" /> | ||
</logger> | ||
|
||
<logger name="org.springframework.context"> | ||
<level value="info" /> | ||
</logger> | ||
|
||
<logger name="org.springframework.http"> | ||
<level value="info" /> | ||
</logger> | ||
|
||
<logger name="org.springframework.web"> | ||
<level value="debug" /> | ||
</logger> | ||
|
||
<logger name="org.springframework.binding"> | ||
<level value="info" /> | ||
</logger> | ||
|
||
<logger name="org.springframework.webflow"> | ||
<level value="debug" /> | ||
</logger> | ||
|
||
<!-- Root Logger --> | ||
<root> | ||
<priority value="info" /> | ||
<appender-ref ref="console" /> | ||
</root> | ||
|
||
</log4j:configuration> |
23 changes: 23 additions & 0 deletions
23
webflow-showcase/src/main/webapp/WEB-INF/flows/embedded-flow-in-modal-dialog/flow.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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="step1" view="embeddedFlowInModalDialog/step1"> | ||
<transition on="next" to="step2"/> | ||
<transition on="cancel" to="cancel"/> | ||
</view-state> | ||
|
||
<view-state id="step2" view="embeddedFlowInModalDialog/step2"> | ||
<transition on="previous" to="step1"/> | ||
<transition on="finish" to="success"/> | ||
<transition on="cancel" to="cancel"/> | ||
</view-state> | ||
|
||
<end-state id="success" view="externalRedirect:embeddedFlowInModalDialogContainer?result=success"/> | ||
|
||
<end-state id="cancel" view="externalRedirect:embeddedFlowInModalDialogContainer?result=cancel"/> | ||
|
||
</flow> |
11 changes: 11 additions & 0 deletions
11
webflow-showcase/src/main/webapp/WEB-INF/flows/embedded-flow-in-modal-dialog/step1.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div id="modalDialogContainer"> | ||
<p class="notice">This is step 1 of the flow embedded in a modal dialog.</p> | ||
<form id="step1" action="${flowExecutionUrl}" method="POST"> | ||
<button id="cancel" type="submit" name="_eventId_cancel">Cancel</button> | ||
<button id="next" type="submit" name="_eventId_next">Next >></button> | ||
<script type="text/javascript"> | ||
Spring.addDecoration(new Spring.AjaxEventDecoration({elementId:'next',event:'onclick',formId:'step1',params:{fragments:"body"}})); | ||
Spring.addDecoration(new Spring.AjaxEventDecoration({elementId:'cancel',event:'onclick',formId:'step1',params:{fragments:"body"}})); | ||
</script> | ||
</form> | ||
</div> |
13 changes: 13 additions & 0 deletions
13
webflow-showcase/src/main/webapp/WEB-INF/flows/embedded-flow-in-modal-dialog/step2.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div id="modalDialogContainer"> | ||
<p class="notice">This is step 2 of the flow embedded in a modal dialog.</p> | ||
<form id="step2" action="${flowExecutionUrl}" method="POST"> | ||
<button id="cancel" type="submit" name="_eventId_cancel">Cancel</button> | ||
<button id="previous" type="submit" name="_eventId_previous"><< Previous</button> | ||
<button id="finish" type="submit" name="_eventId_finish">Finish >></button> | ||
<script type="text/javascript"> | ||
Spring.addDecoration(new Spring.AjaxEventDecoration({elementId:'finish',event:'onclick',formId:'step2',params:{fragments:"body"}})); | ||
Spring.addDecoration(new Spring.AjaxEventDecoration({elementId:'previous',event:'onclick',formId:'step2',params:{fragments:"body"}})); | ||
Spring.addDecoration(new Spring.AjaxEventDecoration({elementId:'cancel',event:'onclick',formId:'step2',params:{fragments:"body"}})); | ||
</script> | ||
</form> | ||
</div> |
Oops, something went wrong.