aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/AbstractTextField.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2011-04-20 07:50:25 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2011-04-20 07:50:25 +0000
commit6e68484931ce39bbd4185a1cdedeef37cb8d4aee (patch)
tree790661cee2c0cfc6109bcb8e4a58041d361d5c5f /src/com/vaadin/ui/AbstractTextField.java
parentb412751372655060c5c1a089608ff97ec61eab0f (diff)
downloadvaadin-framework-6e68484931ce39bbd4185a1cdedeef37cb8d4aee.tar.gz
vaadin-framework-6e68484931ce39bbd4185a1cdedeef37cb8d4aee.zip
merging fixes from 6.5
svn changeset:18407/svn branch:6.6
Diffstat (limited to 'src/com/vaadin/ui/AbstractTextField.java')
-rw-r--r--src/com/vaadin/ui/AbstractTextField.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/com/vaadin/ui/AbstractTextField.java b/src/com/vaadin/ui/AbstractTextField.java
index ad31a46157..693106b686 100644
--- a/src/com/vaadin/ui/AbstractTextField.java
+++ b/src/com/vaadin/ui/AbstractTextField.java
@@ -439,17 +439,23 @@ public abstract class AbstractTextField extends AbstractField implements
private void firePendingTextChangeEvent() {
if (textChangeEventPending) {
- fireEvent(new TextChangeEventImpl(this));
textChangeEventPending = false;
+ fireEvent(new TextChangeEventImpl(this));
}
}
@Override
protected void setInternalValue(Object newValue) {
- if (changingVariables) {
+ if (changingVariables && !textChangeEventPending) {
/*
- * Fire text change event before value change event if change is
- * coming from the client side.
+ * Fire a "simulated" text change event before value change event if
+ * change is coming from the client side.
+ *
+ * Iff there is both value change and textChangeEvent in same
+ * variable burst, it is a text field in non immediate mode and the
+ * text change event "flushed" queued value change event. In this
+ * case textChangeEventPending flag is already on and text change
+ * event will be fired after the value change event.
*/
if (newValue == null && lastKnownTextContent != null
&& !lastKnownTextContent.equals(getNullRepresentation())) {
@@ -463,9 +469,7 @@ public abstract class AbstractTextField extends AbstractField implements
textChangeEventPending = true;
}
- if (textChangeEventPending) {
- firePendingTextChangeEvent();
- }
+ firePendingTextChangeEvent();
}
super.setInternalValue(newValue);
}