summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/AbstractTextField.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2011-10-06 20:49:48 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2011-10-06 20:49:48 +0000
commitbeda2ff1f09a4dc3dd4ae002aeb8b145b01e3e1e (patch)
treed55b9854f0d5c3fe75977cac569bcc921c574fbe /src/com/vaadin/ui/AbstractTextField.java
parent51c04a285ac26286dc6327a3c212acd2cabc44e9 (diff)
downloadvaadin-framework-beda2ff1f09a4dc3dd4ae002aeb8b145b01e3e1e.tar.gz
vaadin-framework-beda2ff1f09a4dc3dd4ae002aeb8b145b01e3e1e.zip
reverted #6588 fix, causes rather bad regressions
svn changeset:21621/svn branch:6.7
Diffstat (limited to 'src/com/vaadin/ui/AbstractTextField.java')
-rw-r--r--src/com/vaadin/ui/AbstractTextField.java34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/com/vaadin/ui/AbstractTextField.java b/src/com/vaadin/ui/AbstractTextField.java
index e31efb85c2..4ed76d367b 100644
--- a/src/com/vaadin/ui/AbstractTextField.java
+++ b/src/com/vaadin/ui/AbstractTextField.java
@@ -92,12 +92,6 @@ public abstract class AbstractTextField extends AbstractField implements
*/
private boolean changingVariables;
- /**
- * Track whether the value on the server has actually changed to avoid
- * updating the text in the input element on every repaint
- */
- private boolean localValueChanged = true;
-
protected AbstractTextField() {
super();
}
@@ -129,11 +123,6 @@ public abstract class AbstractTextField extends AbstractField implements
throw new IllegalStateException(
"Null values are not allowed if the null-representation is null");
}
-
- if (localValueChanged) {
- target.addAttribute(VTextField.ATTR_TEXT_CHANGED, true);
- localValueChanged = false;
- }
target.addVariable(this, "text", value);
if (selectionPosition != -1) {
@@ -224,8 +213,7 @@ public abstract class AbstractTextField extends AbstractField implements
if (newValue != oldValue
&& (newValue == null || !newValue.equals(oldValue))) {
boolean wasModified = isModified();
- // Don't update the local change flag
- super.setValue(newValue, true);
+ setValue(newValue, true);
// If the modified status changes, or if we have a
// formatter, repaint is needed after all.
@@ -250,26 +238,6 @@ public abstract class AbstractTextField extends AbstractField implements
}
@Override
- protected void setValue(Object newValue, boolean repaintIsNotNeeded)
- throws ReadOnlyException, ConversionException {
- if (notEqual(newValue, getValue())
- || notEqual(newValue, lastKnownTextContent)) {
- // The client should use the new value
- localValueChanged = true;
- if (!repaintIsNotNeeded) {
- // Repaint even if super.setValue doesn't detect any change
- requestRepaint();
- }
- }
- super.setValue(newValue, repaintIsNotNeeded);
- }
-
- private static boolean notEqual(Object newValue, Object oldValue) {
- return oldValue != newValue
- && (newValue == null || !newValue.equals(oldValue));
- }
-
- @Override
public Class getType() {
return String.class;
}