]> source.dussan.org Git - vaadin-framework.git/commitdiff
Successful reservation message.
authorMarc Englund <marc.englund@itmill.com>
Wed, 29 Aug 2007 13:35:23 +0000 (13:35 +0000)
committerMarc Englund <marc.englund@itmill.com>
Wed, 29 Aug 2007 13:35:23 +0000 (13:35 +0000)
svn changeset:2152/svn branch:trunk

src/com/itmill/toolkit/demo/reservation/ReservationApplication.java

index 07226794e9832593f4503fc2f836627c2247a736..af98930b72a5ce899057a496ea34d1b055c63b4e 100644 (file)
@@ -130,6 +130,9 @@ public class ReservationApplication extends Application {
                db.addReservation(resource, 0, (Date) reservedFrom.getValue(),\r
                        (Date) reservedTo.getValue(), (String) description\r
                                .getValue());\r
+               statusLabel.setCaption("Success!");\r
+               statusLabel\r
+                       .setValue("You have reserved the resource for the selected period.");\r
            }\r
        } catch (ResourceNotAvailableException e) {\r
            statusLabel.setCaption("Reservation failed");\r
@@ -183,7 +186,7 @@ public class ReservationApplication extends Application {
                    SampleDB.Resource.PROPERTY_ID_NAME).getValue());\r
            reservationButton.setEnabled(true);\r
        }\r
-       \r
+\r
     }\r
 \r
     private void initCalendarFieldPropertyIds(CalendarField cal) {\r
@@ -193,7 +196,7 @@ public class ReservationApplication extends Application {
        cal\r
                .setItemTitlePropertyId(SampleDB.Reservation.PROPERTY_ID_DESCRIPTION);\r
     }\r
-    \r
+\r
     private void resetStatus() {\r
        statusLabel.setCaption(null);\r
        statusLabel.setValue(null);\r
@@ -204,6 +207,5 @@ public class ReservationApplication extends Application {
        refreshReservations();\r
        resetStatus();\r
     }\r
-    \r
 \r
 }\r