}
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
+ boolean firstPaint = (this.client == null);
this.client = client;
id = uidl.getId();
}
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
"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;
}