From e7129fcaefed3fe6d0cb6da2fc8f6bf0e3fff772 Mon Sep 17 00:00:00 2001 From: Erwin Vervaet Date: Wed, 17 Jan 2007 09:24:38 +0000 Subject: [PATCH] Sample polishing. --- .../shippingrate/project.properties | 4 +- .../shippingrate/domain/RateService.java | 2 +- .../shippingrate/domain/StubRateService.java | 8 ++-- .../webapp/WEB-INF/shippingrate-servlet.xml | 7 ---- .../shippingrate/src/main/webapp/index.jsp | 38 ++++++++++--------- 5 files changed, 27 insertions(+), 32 deletions(-) diff --git a/spring-webflow-samples/shippingrate/project.properties b/spring-webflow-samples/shippingrate/project.properties index 7d989e52..f80ab3a7 100644 --- a/spring-webflow-samples/shippingrate/project.properties +++ b/spring-webflow-samples/shippingrate/project.properties @@ -3,8 +3,8 @@ # The location of the common build system common.build.dir=${basedir}/../../common-build -javac.source=1.3 -javac.target=1.3 +javac.source=1.5 +javac.target=1.5 # Do not publish built artifacts to the integration repository do.publish=false \ No newline at end of file diff --git a/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/RateService.java b/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/RateService.java index 2e6b5a07..d2bee01f 100644 --- a/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/RateService.java +++ b/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/RateService.java @@ -19,7 +19,7 @@ import java.util.Map; public interface RateService { - public Map getCountries(); + public Map getCountries(); public Map getPackageTypes(); diff --git a/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/StubRateService.java b/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/StubRateService.java index da9fbdb3..a3638a3e 100644 --- a/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/StubRateService.java +++ b/spring-webflow-samples/shippingrate/src/main/java/org/springframework/webflow/samples/shippingrate/domain/StubRateService.java @@ -21,15 +21,15 @@ import java.util.Map; public class StubRateService implements RateService { - public Map getCountries() { - Map countries = new HashMap(); + public Map getCountries() { + Map countries = new HashMap(); countries.put("US", "United States"); countries.put("CA", "Canada"); return countries; } - public Map getPackageTypes() { - Map packageTypes = new HashMap(); + public Map getPackageTypes() { + Map packageTypes = new HashMap(); packageTypes.put("1", "Letter Envelope"); packageTypes.put("2", "Express Box"); packageTypes.put("3", "Tube"); diff --git a/spring-webflow-samples/shippingrate/src/main/webapp/WEB-INF/shippingrate-servlet.xml b/spring-webflow-samples/shippingrate/src/main/webapp/WEB-INF/shippingrate-servlet.xml index c32b92b8..1a33afb0 100644 --- a/spring-webflow-samples/shippingrate/src/main/webapp/WEB-INF/shippingrate-servlet.xml +++ b/spring-webflow-samples/shippingrate/src/main/webapp/WEB-INF/shippingrate-servlet.xml @@ -40,11 +40,4 @@ - - - - - MessageResources - - \ No newline at end of file diff --git a/spring-webflow-samples/shippingrate/src/main/webapp/index.jsp b/spring-webflow-samples/shippingrate/src/main/webapp/index.jsp index 12eba4b3..a6097508 100644 --- a/spring-webflow-samples/shippingrate/src/main/webapp/index.jsp +++ b/spring-webflow-samples/shippingrate/src/main/webapp/index.jsp @@ -16,25 +16,27 @@ wizard embedded in a zone of this page that makes Ajax calls to the server to participate in a executing flow. To complete processing, this wizard takes the details about a shipment and calls a service to get the shipping rate. -

- The techniques demonstrated are: -

    -
  • - Using a JavaScript component to submit regular forms through an AJAX request, and inserting the HTML - received from the server into a DIV tag. -
  • -
  • - Using the "_flowId" request parameter to let the view tell the web - flow controller which flow needs to be started. -
  • -
  • - Implementing a wizard using Spring Web Flow. -
  • -

-

- Note: this sample has been tested successfully on Internet Explorer 6 and Safari 2.0.3. There are currently known Javascript issues with use on Firefox 1.5. -

+

+ The techniques demonstrated are: +

+
    +
  • + Using a JavaScript component to submit regular forms through an AJAX request, and inserting the HTML + received from the server into a DIV tag. +
  • +
  • + Using the "_flowId" request parameter to let the view tell the web + flow controller which flow needs to be started. +
  • +
  • + Implementing a wizard using Spring Web Flow. +
  • +
+

+ Note: this sample has been tested successfully on Internet Explorer 6 and 7, Firefox 2 and Safari 2. + There are currently known Javascript issues with use on Firefox 1.5. +