From: Leif Åstrand Date: Tue, 27 Sep 2011 13:23:54 +0000 (+0000) Subject: #6588 changed to check for uninitialized client state on the client X-Git-Tag: 6.7.0.rc1~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dc7d15784380209ca18ea9648db9e622bdde65f2;p=vaadin-framework.git #6588 changed to check for uninitialized client state on the client svn changeset:21367/svn branch:6.7 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java index f7edf5705f..005715384b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java @@ -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 diff --git a/src/com/vaadin/ui/AbstractTextField.java b/src/com/vaadin/ui/AbstractTextField.java index ef0663a157..e31efb85c2 100644 --- a/src/com/vaadin/ui/AbstractTextField.java +++ b/src/com/vaadin/ui/AbstractTextField.java @@ -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; }