From aace42fb8fd4a7d7023aec0626ebeadb5aa8f60b Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Tue, 13 May 2008 15:34:19 +0000 Subject: [PATCH] polish --- .../springframework/webflow/samples/booking/Booking.java | 6 +++--- .../main/webapp/WEB-INF/hotels/booking/messages.properties | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/spring-webflow-samples/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java b/spring-webflow-samples/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java index 0a95fd3b..26adfcd4 100755 --- a/spring-webflow-samples/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java +++ b/spring-webflow-samples/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java @@ -178,11 +178,11 @@ public class Booking implements Serializable { public void validateEnterBookingDetails(MessageContext context) { if (checkinDate.before(today())) { - context.addMessage(new MessageBuilder().error().source("checkinDate").code("checkinDate.beforeToday") - .build()); + context.addMessage(new MessageBuilder().error().source("checkinDate").code( + "booking.checkinDate.beforeToday").build()); } else if (checkoutDate.before(checkinDate)) { context.addMessage(new MessageBuilder().error().source("checkoutDate").code( - "checkoutDate.beforeCheckinDate").build()); + "booking.checkoutDate.beforeCheckinDate").build()); } } diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.properties b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.properties index 5b582e8b..bb7f4792 100644 --- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.properties +++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.properties @@ -1,4 +1,5 @@ -checkinDate.beforeToday=The Check In Date must be a future date -checkoutDate.beforeCheckinDate=The Check Out date must be later than the Check In Date booking.checkinDate.typeMismatch=The Check In Date must be in the format dd/mm/yy -booking.checkoutDate.typeMismatch=The Check Out Date must be in the format dd/mm/yy \ No newline at end of file +booking.checkinDate.beforeToday=The Check In Date must be a future date + +booking.checkoutDate.typeMismatch=The Check Out Date must be in the format dd/mm/yy +booking.checkoutDate.beforeCheckinDate=The Check Out date must be later than the Check In Date