]> source.dussan.org Git - vaadin-framework.git/commitdiff
#6588 changed to check for uninitialized client state on the client
authorLeif Åstrand <leif@vaadin.com>
Tue, 27 Sep 2011 13:23:54 +0000 (13:23 +0000)
committerLeif Åstrand <leif@vaadin.com>
Tue, 27 Sep 2011 13:23:54 +0000 (13:23 +0000)
svn changeset:21367/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VTextField.java
src/com/vaadin/ui/AbstractTextField.java

index f7edf5705f47bc10c2b1c2ce939e26a3707447bc..005715384bf68defa673c3559ef1df0c357e8cfe 100644 (file)
@@ -202,6 +202,7 @@ public class VTextField extends TextBoxBase implements Paintable, Field,
     }
 
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
+        boolean firstPaint = (this.client == null);
         this.client = client;
         id = uidl.getId();
 
@@ -246,10 +247,10 @@ public class VTextField extends TextBoxBase implements Paintable, Field,
         }
 
         final String text;
-        if (uidl.hasAttribute(ATTR_TEXT_CHANGED)
-                && uidl.getBooleanAttribute(ATTR_TEXT_CHANGED)
-                && uidl.hasVariable("text")) {
-            // Use value from UIDL only if something hans changed on the server
+        if (uidl.hasVariable("text")
+                && (firstPaint || (uidl.hasAttribute(ATTR_TEXT_CHANGED) && uidl
+                        .getBooleanAttribute(ATTR_TEXT_CHANGED)))) {
+            // Use value from UIDL only if something has changed on the server
             text = uidl.getStringVariable("text");
         } else {
             // Use what we already have if no change from the server
index ef0663a157128efec1f1fd9da732b09fabe0bc7a..e31efb85c2f5d4c2a4319b5df9ebb4e9b4401af2 100644 (file)
@@ -130,7 +130,7 @@ public abstract class AbstractTextField extends AbstractField implements
                     "Null values are not allowed if the null-representation is null");
         }
 
-        if (localValueChanged || target.isFullRepaint()) {
+        if (localValueChanged) {
             target.addAttribute(VTextField.ATTR_TEXT_CHANGED, true);
             localValueChanged = false;
         }