diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2013-02-11 17:04:15 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-02-18 17:11:50 +0000 |
commit | c4a0bc318ec9c6b41d652e7020ee39784cc1eb10 (patch) | |
tree | d9decb3f9b52f9b15a580b5e4cc7e3a0b7fde539 /server/src/com/vaadin/ui/CheckBox.java | |
parent | f3ad9cad8d3c12e3e25574569186d52c79c4f2a1 (diff) | |
download | vaadin-framework-c4a0bc318ec9c6b41d652e7020ee39784cc1eb10.tar.gz vaadin-framework-c4a0bc318ec9c6b41d652e7020ee39784cc1eb10.zip |
Properly pass the AbstractField internal value to shared state in Slider and ProgressIndicator (#10921)
* In case of a null value, 0 is stored to shared state. This is consistent with how CheckBox is already implemented.
* This somewhat hacky solution should be replaced with a better one once AbstractField itself is migrated. See #11064.
Change-Id: I2b313af8491a6deccdc7a509dcd1b718482cdcd4
Diffstat (limited to 'server/src/com/vaadin/ui/CheckBox.java')
-rw-r--r-- | server/src/com/vaadin/ui/CheckBox.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/CheckBox.java b/server/src/com/vaadin/ui/CheckBox.java index 22b90b224f..0ace0a4f26 100644 --- a/server/src/com/vaadin/ui/CheckBox.java +++ b/server/src/com/vaadin/ui/CheckBox.java @@ -110,6 +110,13 @@ public class CheckBox extends AbstractField<Boolean> { return (CheckBoxState) super.getState(); } + /* + * Overridden to keep the shared state in sync with the AbstractField + * internal value. Should be removed once AbstractField is refactored to use + * shared state. + * + * See tickets #10921 and #11064. + */ @Override protected void setInternalValue(Boolean newValue) { super.setInternalValue(newValue); |