From 8a55f79a6fa5a4613880360856df65503787ae73 Mon Sep 17 00:00:00 2001 From: Jeremy Grelle Date: Tue, 15 Jan 2008 20:35:59 +0000 Subject: [PATCH] Cleaning up after Keith. :) --- .../samples/booking/flow/booking/BookingActions.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/booking/BookingActions.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/booking/BookingActions.java index e0966ed0..f93337ee 100644 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/booking/BookingActions.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/booking/BookingActions.java @@ -4,8 +4,7 @@ import java.util.Calendar; import javax.persistence.EntityManager; -import org.springframework.binding.message.Messages; -import org.springframework.binding.message.Severity; +import org.springframework.binding.message.MessageBuilder; import org.springframework.webflow.action.MultiAction; import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.RequestContext; @@ -55,11 +54,13 @@ public class BookingActions extends MultiAction { calendar.add(Calendar.DAY_OF_MONTH, -1); if (booking.getCheckinDate().before(calendar.getTime())) { context.getMessageContext().addMessage( - Messages.text("checkinDate", "Check in date must be a future date", Severity.ERROR)); + new MessageBuilder().source("checkinDate").defaultText("Check in date must be a future date") + .error().build()); return error(); } else if (!booking.getCheckinDate().before(booking.getCheckoutDate())) { context.getMessageContext().addMessage( - Messages.text("checkoutDate", "Check out date must be later than check in date", Severity.ERROR)); + new MessageBuilder().source("checkoutDate").defaultText( + "Check out date must be later than check in date").error().build()); return error(); } return success();