From: Marc Englund Date: Wed, 29 Aug 2007 13:35:23 +0000 (+0000) Subject: Successful reservation message. X-Git-Tag: 6.7.0.beta1~6053 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4ae412afcf9ba9d1952381d726117ef9987dfc56;p=vaadin-framework.git Successful reservation message. svn changeset:2152/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java b/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java index 07226794e9..af98930b72 100644 --- a/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java +++ b/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java @@ -130,6 +130,9 @@ public class ReservationApplication extends Application { db.addReservation(resource, 0, (Date) reservedFrom.getValue(), (Date) reservedTo.getValue(), (String) description .getValue()); + statusLabel.setCaption("Success!"); + statusLabel + .setValue("You have reserved the resource for the selected period."); } } catch (ResourceNotAvailableException e) { statusLabel.setCaption("Reservation failed"); @@ -183,7 +186,7 @@ public class ReservationApplication extends Application { SampleDB.Resource.PROPERTY_ID_NAME).getValue()); reservationButton.setEnabled(true); } - + } private void initCalendarFieldPropertyIds(CalendarField cal) { @@ -193,7 +196,7 @@ public class ReservationApplication extends Application { cal .setItemTitlePropertyId(SampleDB.Reservation.PROPERTY_ID_DESCRIPTION); } - + private void resetStatus() { statusLabel.setCaption(null); statusLabel.setValue(null); @@ -204,6 +207,5 @@ public class ReservationApplication extends Application { refreshReservations(); resetStatus(); } - }