From a98eb431b0db28cbb0029b2d20f28664c3040200 Mon Sep 17 00:00:00 2001 From: Jeremy Grelle Date: Tue, 26 Feb 2008 23:03:54 +0000 Subject: [PATCH] Adding ability to resolve flow-local Spring Beans from EL expressions. --- .../WEB-INF/config/web-application-config.xml | 34 ++--- .../WEB-INF/flow/booking/booking-beans.xml | 10 ++ .../webapp/WEB-INF/flow/booking/booking.xml | 58 ++++++++ .../WEB-INF/flow/booking/bookingForm.xhtml | 134 ++++++++++++++++++ .../WEB-INF/flow/booking/confirmBooking.xhtml | 69 +++++++++ .../WEB-INF/flow/main/displayHotels.xhtml | 57 ++++++++ .../WEB-INF/flow/main/hotelDetails.xhtml | 56 ++++++++ .../webapp/WEB-INF/flow/main/main-beans.xml | 12 ++ .../main/webapp/WEB-INF/flow/main/main.xhtml | 87 ++++++++++++ .../main/webapp/WEB-INF/flow/main/main.xml | 84 +++++++++++ 10 files changed, 577 insertions(+), 24 deletions(-) create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking-beans.xml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking.xml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/bookingForm.xhtml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/confirmBooking.xhtml create mode 100644 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/displayHotels.xhtml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/hotelDetails.xhtml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main-beans.xml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xhtml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xml diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/web-application-config.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/web-application-config.xml index 79ca7c98..5aa7e046 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/web-application-config.xml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/web-application-config.xml @@ -2,11 +2,14 @@ + http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd + http://www.springframework.org/schema/faces-config + http://www.springframework.org/schema/faces-config/spring-faces-config-2.0.xsd"> @@ -16,34 +19,17 @@ - - - - + - - - + + + - - - - - - - - - - - - - - - - + + diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking-beans.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking-beans.xml new file mode 100755 index 00000000..141de522 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking-beans.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking.xml new file mode 100755 index 00000000..a67e7132 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/bookingForm.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/bookingForm.xhtml new file mode 100755 index 00000000..d3523b55 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/bookingForm.xhtml @@ -0,0 +1,134 @@ + + + + + +
+

Book Hotel

+ + +
+
+
Name:
+
#{hotel.name}
+
+
+
Address:
+
#{hotel.address}
+
+
+
City, State:
+
#{hotel.city}, #{hotel.state}
+
+
+
Zip:
+
#{hotel.zip}
+
+
+
Country:
+
#{hotel.country}
+
+
+
Nightly rate:
+
+ + + +
+
+
+
+ Check In Date: +
+
+ + + + + +
+
+
+
+ Check Out Date: +
+
+ + + + + +
+
+
+
+ Room Preference: +
+
+ + + +
+
+
+
+ Smoking Preference: +
+
+ + + +
+
+
+
+ Credit Card #: +
+
+ + + +
+
+
+
+ Credit Card Name: +
+
+ + + +
+
+
+
+ Credit Card Expiry: +
+
+ + + + + + +
+
+ +
+ + + + +
+
+
+
+ +
+
\ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/confirmBooking.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/confirmBooking.xhtml new file mode 100755 index 00000000..a6d8b04c --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/confirmBooking.xhtml @@ -0,0 +1,69 @@ + + + + + +
+

Confirm Hotel Booking

+
+ +
+ +
+
+
Name:
+
#{hotel.name}
+
+
+
Address:
+
#{hotel.address}
+
+
+
City, State:
+
#{hotel.city}, #{hotel.state}
+
+
+
Zip:
+
#{hotel.zip}
+
+
+
Country:
+
#{hotel.country}
+
+
+
Total payment:
+
+ + + +
+
+
+
Check In Date:
+
+
+
+
Check Out Date:
+
+
+
+
Credit Card #:
+
#{booking.creditCard}
+
+
+   +   + +
+ +
+
+
+ +
+
diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/displayHotels.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/displayHotels.xhtml new file mode 100644 index 00000000..3deb7ec0 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/displayHotels.xhtml @@ -0,0 +1,57 @@ + + + + + +
+ +

Hotel Results

+

+ Search Criteria: #{searchCriteria}
+ +

+ +
+ + + + Name + #{hotel.name} + + + Address + #{hotel.address} + + + City, State + #{hotel.city}, #{hotel.state}, #{hotel.country} + + + Zip + #{hotel.zip} + + + Action + + + + + + +
+
+
+
+
+
\ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/hotelDetails.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/hotelDetails.xhtml new file mode 100755 index 00000000..1f5228e2 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/hotelDetails.xhtml @@ -0,0 +1,56 @@ + + + + + +
+

View Hotel

+
+
Name:
+
#{hotel.name}
+
+
+
Address:
+
#{hotel.address}
+
+
+
City:
+
#{hotel.city}
+
+
+
State:
+
#{hotel.state}
+
+
+
Zip:
+
#{hotel.zip}
+
+
+
Country:
+
#{hotel.country}
+
+
+
Nightly rate:
+
+ + + +
+
+
+ +
+ +
+ + +
+
+
+
+ +
\ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main-beans.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main-beans.xml new file mode 100755 index 00000000..c7bcf493 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main-beans.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xhtml new file mode 100755 index 00000000..6ecb6e9c --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xhtml @@ -0,0 +1,87 @@ + + + + + +
+ + + +

Search Hotels

+ + +
+
+
+
+
+ + + +
+
+ Maximum results: + + + + + +
+
+ +
+
+
+
+ +
+
+ + +
+ +

Current Hotel Bookings

+ + + + + Name + #{booking.hotel.name} + + + Address + #{booking.hotel.address} + + + City, State + #{booking.hotel.city}, #{booking.hotel.state} + + + Check in date + + + + Check out date + + + + Confirmation number + #{booking.id} + + + Action + + + + +
+
+
+
+ +
\ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xml new file mode 100755 index 00000000..cf130b14 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file