From 09ae98d264f3f683ede4371adfd91a27362a13a6 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Wed, 27 Feb 2008 16:37:05 +0000 Subject: [PATCH] polishing and simplifications --- ...org.springframework.ide.eclipse.core.prefs | 12 ++- .../booking-jsf/.springBeans | 7 +- .../samples/booking/BookingService.java | 12 +-- .../samples/booking/JpaBookingService.java | 20 ++-- .../samples/booking/SearchCriteria.java | 76 +++++++++++++++ .../samples/booking/web/FlowHelper.java | 94 +++++++++++++++++++ .../config/application-layer-config.xml | 44 --------- .../WEB-INF/config/web-application-config.xml | 44 --------- .../src/main/webapp/WEB-INF/faces-config.xml | 16 ---- .../WEB-INF/flow/booking/booking-beans.xml | 10 -- .../webapp/WEB-INF/flow/main/main-beans.xml | 12 --- .../{flow => flows}/booking/booking.xml | 6 +- .../{flow => flows}/booking/bookingForm.xhtml | 14 ++- .../booking/confirmBooking.xhtml | 6 +- .../{flow => flows}/main/displayHotels.xhtml | 10 +- .../{flow => flows}/main/hotelDetails.xhtml | 2 +- .../WEB-INF/{flow => flows}/main/main.xhtml | 59 ++++++------ .../WEB-INF/{flow => flows}/main/main.xml | 48 +++++----- .../src/main/webapp/WEB-INF/intro.xhtml | 40 ++++++++ .../src/main/webapp/WEB-INF/template.xhtml | 52 ++++++++++ .../webapp/WEB-INF/web-application-config.xml | 73 ++++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 22 ++--- .../booking-jsf/src/main/webapp/index.html | 2 +- .../booking-jsf/src/main/webapp/intro.xhtml | 79 ---------------- .../src/main/webapp/template.xhtml | 57 ----------- 25 files changed, 427 insertions(+), 390 deletions(-) create mode 100755 spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/SearchCriteria.java create mode 100644 spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/web/FlowHelper.java delete mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/application-layer-config.xml delete mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/web-application-config.xml delete mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/faces-config.xml delete mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking-beans.xml delete mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main-beans.xml rename spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/{flow => flows}/booking/booking.xml (90%) rename spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/{flow => flows}/booking/bookingForm.xhtml (92%) rename spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/{flow => flows}/booking/confirmBooking.xhtml (93%) rename spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/{flow => flows}/main/displayHotels.xhtml (84%) rename spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/{flow => flows}/main/hotelDetails.xhtml (99%) rename spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/{flow => flows}/main/main.xhtml (58%) rename spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/{flow => flows}/main/main.xml (59%) create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/intro.xhtml create mode 100644 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/template.xhtml create mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web-application-config.xml delete mode 100755 spring-webflow-samples/booking-jsf/src/main/webapp/intro.xhtml delete mode 100644 spring-webflow-samples/booking-jsf/src/main/webapp/template.xhtml diff --git a/spring-webflow-samples/booking-jsf/.settings/org.springframework.ide.eclipse.core.prefs b/spring-webflow-samples/booking-jsf/.settings/org.springframework.ide.eclipse.core.prefs index c2d8ea59..f55808e4 100755 --- a/spring-webflow-samples/booking-jsf/.settings/org.springframework.ide.eclipse.core.prefs +++ b/spring-webflow-samples/booking-jsf/.settings/org.springframework.ide.eclipse.core.prefs @@ -1,9 +1,14 @@ -#Thu Aug 09 13:12:30 EDT 2007 +#Wed Feb 27 11:35:00 EST 2008 eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true +org.springframework.ide.eclipse.core.builders.enable.osgibundleupdater=true +org.springframework.ide.eclipse.core.enable.project.preferences=false +org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.bestpractices.beansvalidator=true org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=true org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.legacyxmlusage.jndiobjectfactory-com.springsource.sts.bestpractices.beansvalidator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true @@ -13,7 +18,10 @@ org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.i org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true diff --git a/spring-webflow-samples/booking-jsf/.springBeans b/spring-webflow-samples/booking-jsf/.springBeans index eebf60ca..27043fc3 100755 --- a/spring-webflow-samples/booking-jsf/.springBeans +++ b/spring-webflow-samples/booking-jsf/.springBeans @@ -7,8 +7,7 @@ - src/main/webapp/WEB-INF/config/application-layer-config.xml - src/main/webapp/WEB-INF/config/web-application-config.xml + src/main/webapp/WEB-INF/web-application-config.xml @@ -16,8 +15,6 @@ true false - src/main/webapp/WEB-INF/config/application-layer-config.xml - src/main/webapp/WEB-INF/config/web-application-config.xml @@ -25,7 +22,6 @@ true false - src/main/webapp/WEB-INF/config/application-layer-config.xml @@ -33,7 +29,6 @@ true false - src/main/webapp/WEB-INF/config/application-layer-config.xml diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java index 68c8a114..a3983e7e 100755 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java @@ -13,7 +13,7 @@ public interface BookingService { * @param username the user's name * @return their bookings */ - public List findBookings(String username); + public List findBookings(User user); /** * Find hotels available for booking by some criteria. @@ -29,17 +29,9 @@ public interface BookingService { */ public Hotel findHotelById(Long id); - /** - * Returns a new booking object attached to the current persistence context. - * @param hotel the hotel being booked - * @param user the user performing the booking - * @return the booking - */ - public Booking createBooking(Hotel hotel, User user); - /** * Cancel an existing booking. * @param id the booking id */ - public void cancelBooking(Long id); + public void cancelBooking(Booking booking); } diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java index b48161ae..6913247c 100755 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java @@ -6,6 +6,7 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.springframework.stereotype.Repository; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** @@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional; * against the backing repository. The EntityManager reference is provided by the managing container (Spring) * automatically. */ +@Service @Repository public class JpaBookingService implements BookingService { @@ -25,9 +27,9 @@ public class JpaBookingService implements BookingService { @Transactional(readOnly = true) @SuppressWarnings("unchecked") - public List findBookings(String username) { + public List findBookings(User user) { return em.createQuery("select b from Booking b where b.user.username = :username order by b.checkinDate") - .setParameter("username", username).getResultList(); + .setParameter("username", user.getName()).getResultList(); } @Transactional(readOnly = true) @@ -48,18 +50,8 @@ public class JpaBookingService implements BookingService { // read-write transactional methods @Transactional - public Booking createBooking(Hotel hotel, User user) { - Booking booking = new Booking(hotel, user); - em.persist(booking); - return booking; - } - - @Transactional - public void cancelBooking(Long id) { - Booking booking = em.find(Booking.class, id); - if (booking != null) { - em.remove(booking); - } + public void cancelBooking(Booking booking) { + em.remove(booking); } // helpers diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/SearchCriteria.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/SearchCriteria.java new file mode 100755 index 00000000..9528cfeb --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/SearchCriteria.java @@ -0,0 +1,76 @@ +package org.springframework.webflow.samples.booking; + +import java.io.Serializable; + +import org.springframework.util.StringUtils; + +/** + * A backing bean for the main hotel search form. Encapsulates the criteria needed to perform a hotel search. + */ +public class SearchCriteria implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * The user-provided search criteria for finding Hotels. + */ + private String searchString = ""; + + /** + * The maximum page size of the Hotel result list + */ + private int pageSize = 5; + + /** + * The current page of the Hotel result list. + */ + private int page; + + public String getSearchString() { + return searchString; + } + + public void setSearchString(String searchString) { + this.searchString = searchString; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + public int getPage() { + return page; + } + + public void setPage(int page) { + this.page = page; + } + + /** + * Increase the current page + */ + public void nextPage() { + page++; + } + + /** + * Decrease the current page + */ + public void prevPage() { + page--; + } + + public String toString() { + StringBuffer criteria = new StringBuffer(); + if (StringUtils.hasText(searchString)) { + criteria.append("Text: " + searchString + ", "); + } + criteria.append("Page Size: " + pageSize); + return criteria.toString(); + } + +} \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/web/FlowHelper.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/web/FlowHelper.java new file mode 100644 index 00000000..ea42097a --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/web/FlowHelper.java @@ -0,0 +1,94 @@ +package org.springframework.webflow.samples.booking.web; + +import java.util.ArrayList; +import java.util.List; + +import javax.faces.model.SelectItem; +import javax.persistence.EntityManager; + +import org.springframework.stereotype.Service; +import org.springframework.webflow.samples.booking.Booking; +import org.springframework.webflow.samples.booking.Hotel; +import org.springframework.webflow.samples.booking.User; + +@Service +public class FlowHelper { + + private List bedOptions; + + private List smokingOptions; + + private List creditCardExpMonths; + + private List creditCardExpYears; + + private List pageSizeOptions; + + public List getBedOptions() { + if (bedOptions == null) { + bedOptions = new ArrayList(); + bedOptions.add(new SelectItem(new Integer(1), "One king-size bed")); + bedOptions.add(new SelectItem(new Integer(2), "Two double beds")); + bedOptions.add(new SelectItem(new Integer(3), "Three beds")); + } + return bedOptions; + } + + public List getSmokingOptions() { + if (smokingOptions == null) { + smokingOptions = new ArrayList(); + smokingOptions.add(new SelectItem(Boolean.TRUE, "Smoking")); + smokingOptions.add(new SelectItem(Boolean.FALSE, "Non-Smoking")); + } + return smokingOptions; + } + + public List getCreditCardExpMonths() { + if (creditCardExpMonths == null) { + creditCardExpMonths = new ArrayList(); + creditCardExpMonths.add(new SelectItem(new Integer(1), "Jan")); + creditCardExpMonths.add(new SelectItem(new Integer(2), "Feb")); + creditCardExpMonths.add(new SelectItem(new Integer(3), "Mar")); + creditCardExpMonths.add(new SelectItem(new Integer(4), "Apr")); + creditCardExpMonths.add(new SelectItem(new Integer(5), "May")); + creditCardExpMonths.add(new SelectItem(new Integer(6), "Jun")); + creditCardExpMonths.add(new SelectItem(new Integer(7), "Jul")); + creditCardExpMonths.add(new SelectItem(new Integer(8), "Aug")); + creditCardExpMonths.add(new SelectItem(new Integer(9), "Sep")); + creditCardExpMonths.add(new SelectItem(new Integer(10), "Oct")); + creditCardExpMonths.add(new SelectItem(new Integer(11), "Nov")); + creditCardExpMonths.add(new SelectItem(new Integer(12), "Dec")); + } + return creditCardExpMonths; + } + + public List getCreditCardExpYears() { + if (creditCardExpYears == null) { + creditCardExpYears = new ArrayList(); + creditCardExpYears.add(new SelectItem(new Integer(2005), "2005")); + creditCardExpYears.add(new SelectItem(new Integer(2006), "2006")); + creditCardExpYears.add(new SelectItem(new Integer(2007), "2007")); + creditCardExpYears.add(new SelectItem(new Integer(2008), "2008")); + creditCardExpYears.add(new SelectItem(new Integer(2009), "2009")); + creditCardExpYears.add(new SelectItem(new Integer(2010), "2010")); + } + return creditCardExpYears; + } + + public List getPageSizeOptions() { + if (pageSizeOptions == null) { + pageSizeOptions = new ArrayList(); + pageSizeOptions.add(new SelectItem(new Integer(5), "5")); + pageSizeOptions.add(new SelectItem(new Integer(10), "10")); + pageSizeOptions.add(new SelectItem(new Integer(20), "20")); + } + return pageSizeOptions; + } + + public Booking createBooking(Hotel hotel, User user, EntityManager em) { + Booking booking = new Booking(hotel, user); + em.persist(booking); + return booking; + } + +} diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/application-layer-config.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/application-layer-config.xml deleted file mode 100755 index b9666992..00000000 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/application-layer-config.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file 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 deleted file mode 100755 index 5aa7e046..00000000 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/config/web-application-config.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/faces-config.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/faces-config.xml deleted file mode 100755 index 252d150b..00000000 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/faces-config.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - testBean - org.springframework.webflow.samples.booking.TestJsfBean - request - - - - com.sun.facelets.FaceletViewHandler - - \ No newline at end of file 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 deleted file mode 100755 index 141de522..00000000 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking-beans.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ 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 deleted file mode 100755 index c7bcf493..00000000 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main-beans.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ 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/flows/booking/booking.xml similarity index 90% rename from spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/booking/booking.xml rename to spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/booking/booking.xml index faff5a62..01a29746 100755 --- 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/flows/booking/booking.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> - + 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/flows/main/hotelDetails.xhtml similarity index 99% rename from spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/hotelDetails.xhtml rename to spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/main/hotelDetails.xhtml index 1f5228e2..a2cdb9fb 100755 --- 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/flows/main/hotelDetails.xhtml @@ -51,6 +51,6 @@ - + \ 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/flows/main/main.xhtml similarity index 58% rename from spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xhtml rename to spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/main/main.xhtml index 6ecb6e9c..c2058977 100755 --- 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/flows/main/main.xhtml @@ -7,46 +7,42 @@ template="/template.xhtml"> +

Search Hotels

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

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

Current Hotel Bookings

- +

Current Hotel Bookings

@@ -75,13 +71,12 @@ 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/flows/main/main.xml similarity index 59% rename from spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flow/main/main.xml rename to spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/main/main.xml index cf130b14..83ea4a6e 100755 --- 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/flows/main/main.xml @@ -4,51 +4,48 @@ xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> - + - + - - + - + - - + + - + - + - - + + - - + + - - + + - + - + - + - + @@ -57,7 +54,7 @@ - + @@ -67,18 +64,15 @@ - + - + - - \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/intro.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/intro.xhtml new file mode 100755 index 00000000..bceb6686 --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/intro.xhtml @@ -0,0 +1,40 @@ + + + + + +
+

Welcome to the Spring Faces Sample Application

+

+ This hotel booking sample application illustrates "Spring Faces", Spring's first-class support for Java Server Faces (JSF). + Spring Faces integrates Spring, Spring Web Flow, Dojo, Ext, and Facelets to provide a + compelling solution for developing rich web applications with JSF. +

+

+ Currently, Spring Faces is released as a component of the Spring Web Flow distribution, + and has been available beginning with Spring Web Flow 2.0. +

+

+ The key features illustrated in this sample include: +

+
    +
  • A unified navigation model
  • +
  • A robust state management model
  • +
  • Modularization of web application functionality by domain responsibility
  • +
  • Flow-managed persistence contexts with the Java Persistence API (JPA)
  • +
  • Unified Expression Language (EL) integration
  • +
  • Client-side validation with Dojo and Ext
  • +
  • Spring IDE integration, with support for graphical flow modeling
  • +
+

+ Start your hotel booking experience +

+
+ +
+
\ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/template.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/template.xhtml new file mode 100644 index 00000000..84201a4b --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/template.xhtml @@ -0,0 +1,52 @@ + + + + + Spring Faces: Hotel Booking Sample Application + + + + +
+ +
+
+ + + + + + +

+

+
+
+ +
+
+ +
+ + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web-application-config.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web-application-config.xml new file mode 100755 index 00000000..51cb1dfe --- /dev/null +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web-application-config.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web.xml index 0ddf630c..664af8e4 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web.xml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/web.xml @@ -10,38 +10,32 @@ .xhtml - + facelets.DEVELOPMENT true - + facelets.REFRESH_PERIOD 1 - - - facelets.BUILD_BEFORE_RESTORE - false - - + Resources Servlet org.springframework.faces.ui.resource.ResourceServlet 0 - + Resources Servlet /resources/* - + Faces Servlet javax.faces.webapp.FacesServlet @@ -54,18 +48,18 @@ *.faces - + Spring Web MVC Dispatcher Servlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation - /WEB-INF/config/web-application-config.xml + /WEB-INF/web-application-config.xml 2 - + Spring Web MVC Dispatcher Servlet /spring/* diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/index.html b/spring-webflow-samples/booking-jsf/src/main/webapp/index.html index f3ce71ae..fcf8f25b 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/index.html +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/index.html @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/intro.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/intro.xhtml deleted file mode 100755 index 41c36085..00000000 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/intro.xhtml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Spring Faces: Hotel Booking Sample Application - - - - -
- -
-
- - The Westin Diplomat in Hollywood, Florida - - - The Spring Experience - -

- The features illustrated in this sample are just the beginning. - To see what is in store for developing rich web applications with Spring, join us at - The Spring Experience - December 12 - 15, 2007 at the Westin Diplomat in Hollywood, Florida. -

-
-
-
-

Welcome to the Spring Faces Sample Application

-

- This hotel booking sample application illustrates "Spring Faces", Spring's first-class support for Java Server Faces (JSF). - Spring Faces integrates Spring, Spring Web Flow, Dojo, Ext, and Facelets to provide a - compelling solution for developing rich web applications with JSF. -

-

- Currently, Spring Faces is released as a component of the Spring Web Flow distribution, - and has been available beginning with Spring Web Flow 2.0 m1. The current version is running - against Spring Web Flow 2.0m2. -

-

- The key features illustrated in this sample include: -

-
    -
  • A unified navigation model
  • -
  • A robust state management model
  • -
  • Modularization of web application functionality by domain responsibility
  • -
  • Flow-managed persistence contexts with the Java Persistence API (JPA)
  • -
  • Unified Expression Language (EL) integration
  • -
  • Client-side validation with Dojo
  • -
  • Spring IDE integration, with support for graphical flow modeling
  • -
-

- Start your hotel booking experience -

-
-
-
- -
- - \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/template.xhtml b/spring-webflow-samples/booking-jsf/src/main/webapp/template.xhtml deleted file mode 100644 index 8967b059..00000000 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/template.xhtml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - Spring Faces: Hotel Booking Sample Application - - - - - -
- -
-
- - - - - - -

- The features illustrated in this sample are just the beginning. - To see what is in store for developing rich web applications with Spring, join us at - The Spring Experience - December 12 - 15, 2007 at the Westin Diplomat in Hollywood, Florida. -

-
-
- -
-
- -
- - - \ No newline at end of file