summaryrefslogtreecommitdiffstats
path: root/server/src/com
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2013-05-10 16:25:55 +0300
committerVaadin Code Review <review@vaadin.com>2013-05-14 13:15:22 +0000
commitb8c6a15da87ff6d2a83e7c0d79dd45ee120fe6a2 (patch)
treed6ad713f9a5d2e10a53df71017ff5b7b3fbbf91e /server/src/com
parent6d7f5e4bc9b16cb5b6bc3ad2503f251977cbb2af (diff)
downloadvaadin-framework-b8c6a15da87ff6d2a83e7c0d79dd45ee120fe6a2.tar.gz
vaadin-framework-b8c6a15da87ff6d2a83e7c0d79dd45ee120fe6a2.zip
Clear items in ComboBox only if changed (#10924)
Selection is now sent only as a key, removed redundant attribute on the item. Change-Id: I882d4ae17a1dc91f7a55a0b4a94e47c078ffc022
Diffstat (limited to 'server/src/com')
-rw-r--r--server/src/com/vaadin/ui/ComboBox.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java
index 0f42749acd..88e895df82 100644
--- a/server/src/com/vaadin/ui/ComboBox.java
+++ b/server/src/com/vaadin/ui/ComboBox.java
@@ -262,8 +262,8 @@ public class ComboBox extends AbstractSelect implements
target.addAttribute("nullselection", true);
}
target.addAttribute("key", key);
- if (isSelected(id) && keyIndex < selectedKeys.length) {
- target.addAttribute("selected", true);
+ if (keyIndex < selectedKeys.length && isSelected(id)) {
+ // at most one item can be selected at a time
selectedKeys[keyIndex++] = key;
}
target.endTag("so");