diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/tutorial-flow.xml b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/tutorial-flow.xml index e7d5dd10..eae2d76c 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/tutorial-flow.xml +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/tutorial-flow.xml @@ -4,10 +4,6 @@ xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> - - - - @@ -18,7 +14,7 @@ - + \ No newline at end of file diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp index f3f34a22..b0d1e6b7 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp @@ -16,55 +16,41 @@

Creating Your First Web Flow

-

- How are flows authored? -

-

- Flow definitions are typically authored in XML documents. - A flow is typically packaged in its own directory inside /WEB-INF, and co-located with its dependent resources such as page templates and message resources. - For example, the tutorial flow you are using right now lives in the /WEB-INF/tutorial directory along with its JSP page templates. -

-

- Why XML? -

-

- XML is a good format for expressing structure. - Since a flow definition primarily captures the navigation structure between your pages, XML is a good fit. - XML is not appropriate for general programming. - This is why your flows should invoke actions written in Java or Groovy to carry out application behaviors. -

-

- Step-by-step instructions for creating your first flow using the Eclipse-based SpringSource Tool Suite IDE: -

-

Setup your project

-
    -
  1. - Download SpringSource Tool Suite (STS) and the latest Spring Web Flow 2.0.x release. - After downloading completes, extract both archives to your directory of choice. -
  2. -
  3. - Open STS and access File -> Import... -> Existing Projects Into Workspace. Select Browse... and navigate to where you extracted the Spring Web Flow release. - Select the spring-webflow-samples/getting-started-with-spring-webflow folder and import the project. -
  4. -
  5. - After the project import, if you do not already have a servlet container such as Tomcat installed on your workstation you can uses STS to install an embedded Tomcat instance. - To do this, select the SpringSource logo on the tool bar, access the Configuration tab, and select Create Server Instance. -
  6. -
  7. - Next, right-click on the project in your Package Explorer view, and select Run On Server. - Select the server runtime you wish to deploy to and finish to deploy the project. - You should see the tutorial welcome page appear in the embedded web browser. - Alternatively, you can access the application in an external browser such as Firefox at http://localhost:8080/getting-started-with-spring-webflow -
  8. -
+

Create your project

+
+
+
    +
  1. + Download the Eclipse IDE for Spring Developers, called the SpringSource Tool Suite (STS). + After downloading completes, extract the archive to your directory of choice. +
  2. +
  3. + Open STS and access File -> New -> Other... -> SpringSource Tool Suite -> Template Project. + Select "Web Flow Project" and enter helloworld for your project name. + Select the Embedded Apache Tomcat as your project's targeted server runtime. + Finish the new project wizard. +
  4. +
  5. + Next, right-click on your project in your Package Explorer view, and select Run On Server. + You should see your application's welcome page appear in the embedded web browser. + Alternatively, you can access your application in an external browser such as Firefox at http://localhost:8080/helloworld +
  6. +
+
+
+
    +
  1. TODO
  2. +
+
+
-

Create your first helloworld flow

+

Create your first helloworld flow

  1. - Once the application is running, create a new directory for your flow inside /src/main/webapp/WEB-INF; name the directory helloworld. - Next, right-click on the directory and access New -> Spring Web Flow Definition. + Create a new directory for your flow inside /src/main/webapp/WEB-INF; name the directory helloworld. + Right-click on the directory and access New -> Spring Web Flow Definition. Enter the filename helloworld-flow.xml and finish. The flow definition will be generated for you with an initial view-state named start.
  2. @@ -89,7 +75,7 @@
-

Add a navigation rule

+

Add a page navigation rule

  1. Next, try transitioning your flow from one state to another to implement a navigation rule. In your helloworld flow, add the following transition to your start view-state: @@ -129,7 +115,7 @@
-

Add a dynamic navigation rule

+

Add a dynamic page navigation rule

Web flow excels at implementing dynamic navigation logic that takes a user through different paths based on what they enter or who they are.

@@ -222,7 +208,7 @@
-

Finish your helloworld flow

+

Finish your helloworld flow

  1. Finish up your helloworld flow by adding another button on the start.jsp that ends the flow: @@ -248,10 +234,10 @@
-

Visualize the flow

+

Visualize the flow

  1. - In the SpringSource Tool Suite, navigate to your helloworld-flow.xml in the Spring Explorer view, or within the Spring Elements node of the Project Explorer view. + In your IDE, navigate to your helloworld-flow.xml in the Spring Explorer view, or within the Spring Elements node of the Project Explorer view. Right-click on the file and select Open Graphical Editor. Your graph should look similar to the visualization below:

    "/>
  2. @@ -264,7 +250,35 @@
\ No newline at end of file diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp index 3efe923f..f9ff0708 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp @@ -224,6 +224,27 @@ This step does provides useful background information on setting up your own Web No other configuration is required.

+
+

+ How are flows authored? +

+

+ Flow definitions are typically authored in XML documents. + A flow is typically packaged in its own directory inside /WEB-INF, and co-located with its dependent resources such as page templates and message resources. + For example, the tutorial flow you are using right now lives in the /WEB-INF/tutorial directory along with its JSP page templates. +

+
+
+

+ Why XML? +

+

+ XML is a good format for expressing structure. + Since a flow definition primarily captures the navigation structure between your pages, XML is a good fit. + XML is not appropriate for general programming. + This is why your flows should invoke actions written in Java or Groovy to carry out application behaviors. +

+

Next > diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/styles/tutorial.css b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/styles/tutorial.css index 4286741b..569e858d 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/styles/tutorial.css +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/styles/tutorial.css @@ -4,6 +4,10 @@ padding-top: 1em; } +.dojoTabPane { + overflow: auto; +} + .file { font-family: monospace; }