summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractTextField.java
diff options
context:
space:
mode:
authorFabian Lange <lange.fabian@gmail.com>2014-06-20 10:49:50 +0200
committerVaadin Code Review <review@vaadin.com>2014-06-23 06:51:47 +0000
commit0c229ae91460fedaeb557bdc5a646433658b0dfb (patch)
tree4959adbc8ab29cc67515e44e2fc792d39ffba310 /server/src/com/vaadin/ui/AbstractTextField.java
parent6e109e4d73b7e3c09da3000a813904b52ea89991 (diff)
downloadvaadin-framework-0c229ae91460fedaeb557bdc5a646433658b0dfb.tar.gz
vaadin-framework-0c229ae91460fedaeb557bdc5a646433658b0dfb.zip
Reading properties of components should not set state to dirty (#14060).
Many core vaadin components did incorrectly mark the state as dirty when reading from them. This patch fixes the problem, which should reduce the amount of server->client state updates significantly. Change-Id: I342d74129e2985a7f407e9b53a802dc0146d9992
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractTextField.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractTextField.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java
index 25b34ae19f..e0318ddf2b 100644
--- a/server/src/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/com/vaadin/ui/AbstractTextField.java
@@ -96,6 +96,11 @@ public abstract class AbstractTextField extends AbstractField<String> implements
}
@Override
+ protected AbstractTextFieldState getState(boolean markAsDirty) {
+ return (AbstractTextFieldState) super.getState(markAsDirty);
+ }
+
+ @Override
public void beforeClientResponse(boolean initial) {
super.beforeClientResponse(initial);
@@ -311,7 +316,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* @return the maxLength
*/
public int getMaxLength() {
- return getState().maxLength;
+ return getState(false).maxLength;
}
/**
@@ -333,7 +338,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* @return the number of columns in the editor.
*/
public int getColumns() {
- return getState().columns;
+ return getState(false).columns;
}
/**
@@ -358,7 +363,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* @return the current input prompt, or null if not enabled
*/
public String getInputPrompt() {
- return getState().inputPrompt;
+ return getState(false).inputPrompt;
}
/**