summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2011-09-27 13:23:54 +0000
committerLeif Åstrand <leif@vaadin.com>2011-09-27 13:23:54 +0000
commitdc7d15784380209ca18ea9648db9e622bdde65f2 (patch)
treea75ea8729a75df9432080bec52b572ec0ebc44d3 /src/com
parente79b6b471c6bd45f6f453613694b0c3ce46a521d (diff)
downloadvaadin-framework-dc7d15784380209ca18ea9648db9e622bdde65f2.tar.gz
vaadin-framework-dc7d15784380209ca18ea9648db9e622bdde65f2.zip
#6588 changed to check for uninitialized client state on the client
svn changeset:21367/svn branch:6.7
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTextField.java9
-rw-r--r--src/com/vaadin/ui/AbstractTextField.java2
2 files changed, 6 insertions, 5 deletions
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;
}