From e199d4c52d049f07b5c9a61760b4e0325a6be748 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Tue, 21 Aug 2007 04:01:36 +0000 Subject: [PATCH] further polishing --- .../booking/flow/main/MainActions.java | 16 ++--- .../WEB-INF/config/web-application-config.xml | 2 +- .../webapp/flow/booking/booking-beans.xml | 2 +- .../src/main/webapp/flow/booking/booking.xml | 65 ++++++++++--------- .../webapp/flow/booking/hotelDetails.xhtml | 2 +- .../src/main/webapp/flow/main/main.xhtml | 10 +-- .../src/main/webapp/flow/main/main.xml | 19 +++--- 7 files changed, 56 insertions(+), 60 deletions(-) diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java index 7e669b6e..f5fbe9ac 100644 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java @@ -20,7 +20,7 @@ public class MainActions extends MultiAction { } public Event initCurrentUser(RequestContext context) { - User user = new User("springer", "springrocks", "Spring User"); + User user = new User("Springer", "springrocks", "Spring User"); context.getConversationScope().put("user", user); return success(); } @@ -28,23 +28,15 @@ public class MainActions extends MultiAction { public Event findCurrentUserBookings(RequestContext context) { User user = (User) context.getConversationScope().get("user"); List bookings = bookingService.findBookings(user.getName()); - if (bookings != null) { - context.getFlowScope().put("bookings", new SerializableListDataModel(bookings)); - } else { - context.getFlowScope().put("bookings", null); - } + context.getFlowScope().put("bookings", new SerializableListDataModel(bookings)); return success(); } public Event findHotels(RequestContext context) { - SearchCriteria search = (SearchCriteria) context.getFlowScope().get("hotelSearch"); + SearchCriteria search = (SearchCriteria) context.getFlowScope().get("searchCriteria"); List hotels = bookingService .findHotels(search.getSearchString(), search.getPageSize(), search.getPage()); - if (hotels != null) { - context.getFlowScope().put("hotels", new SerializableListDataModel(hotels)); - } else { - context.getFlowScope().put("hotels", null); - } + context.getFlowScope().put("hotels", new SerializableListDataModel(hotels)); return success(); } 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 329ad166..98b05813 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 @@ -44,7 +44,7 @@ - + diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking-beans.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking-beans.xml index 56141daa..8ea635ae 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking-beans.xml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking-beans.xml @@ -6,6 +6,6 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking.xml index bca36bb6..e13cece6 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking.xml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/booking.xml @@ -4,62 +4,63 @@ xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd"> - + - + - - - - - - - - - - - - + + + + + + + + + + + - + - - + + - + - + - - - + + + - - - + + + - - - - + + + + - + - - + + + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/hotelDetails.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/hotelDetails.xhtml index 9bfee410..f3bbe026 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/hotelDetails.xhtml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/booking/hotelDetails.xhtml @@ -49,7 +49,7 @@
-   +  
diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xhtml index adbeffa1..526ffd02 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xhtml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xhtml @@ -14,11 +14,11 @@

Search Hotels

-   - +   +
Maximum results:  - + @@ -53,10 +53,10 @@
diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xml index 90209170..d3cc60ee 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/flow/main/main.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd"> - + @@ -13,24 +13,25 @@ - + - + - + - + - + + @@ -43,8 +44,10 @@ - + - + + + \ No newline at end of file