diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-18 12:07:41 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-12-18 10:44:05 +0000 |
commit | dac2d7ec49d0213ddd2977b9a3dc05c8366ff6b2 (patch) | |
tree | 576671206119756f3fb4af7e4fe8c0c584d8c9fd /server/src/com/vaadin/ui/CheckBox.java | |
parent | 399b62d0ecd593efbb5563db957017ef43a3945c (diff) | |
download | vaadin-framework-dac2d7ec49d0213ddd2977b9a3dc05c8366ff6b2.tar.gz vaadin-framework-dac2d7ec49d0213ddd2977b9a3dc05c8366ff6b2.zip |
Fix inconsistencies in CheckBox clear and isEmpty (#14755)
Change-Id: I566257d3a4db15973f76a5a70adb095bd7203918
Diffstat (limited to 'server/src/com/vaadin/ui/CheckBox.java')
-rw-r--r-- | server/src/com/vaadin/ui/CheckBox.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/CheckBox.java b/server/src/com/vaadin/ui/CheckBox.java index e26e5c4750..e98a2b61b9 100644 --- a/server/src/com/vaadin/ui/CheckBox.java +++ b/server/src/com/vaadin/ui/CheckBox.java @@ -253,4 +253,15 @@ public class CheckBox extends AbstractField<Boolean> { def.getValue(), Boolean.class); } + @Override + public void clear() { + setValue(Boolean.FALSE); + } + + @Override + public boolean isEmpty() { + return getValue() == null || getValue().equals(Boolean.FALSE); + + } + } |