]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #5369 - DateField doesn't show selected value after invalid
authorArtur Signell <artur.signell@itmill.com>
Tue, 7 Sep 2010 16:20:05 +0000 (16:20 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 7 Sep 2010 16:20:05 +0000 (16:20 +0000)
svn changeset:14766/svn branch:6.4

src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java

index 023934569a3c5539d8f88d9e9d7c268927f985be..ba91df0888bf0a280b325ab4a490508b93fe335f 100644 (file)
@@ -74,7 +74,12 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
 \r
         calendar.setSubmitListener(new SubmitListener() {\r
             public void onSubmit() {\r
+                // Update internal value and send valuechange event if immediate\r
                 updateValue(calendar.getDate());\r
+\r
+                // Update text field (a must when not immediate).\r
+                buildDate(true);\r
+\r
                 closeCalendarPanel();\r
             }\r
 \r
@@ -379,6 +384,13 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
         }\r
     }\r
 \r
+    /**\r
+     * Update the text field contents from the date. See {@link #buildDate()}.\r
+     * \r
+     * @param forceValid\r
+     *            true to force the text field to be updated, false to only\r
+     *            update if the parsable flag is true.\r
+     */\r
     protected void buildDate(boolean forceValid) {\r
         if (forceValid) {\r
             parsable = true;\r