diff options
author | Henri Sara <hesara@vaadin.com> | 2013-05-10 13:51:31 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-05-14 13:14:03 +0000 |
commit | 6d7f5e4bc9b16cb5b6bc3ad2503f251977cbb2af (patch) | |
tree | fdb261c5b62886733a1018c28172008413678e44 /client/src/com | |
parent | 29eeda592cf0f219582f1ccc9320457ca630a28e (diff) | |
download | vaadin-framework-6d7f5e4bc9b16cb5b6bc3ad2503f251977cbb2af.tar.gz vaadin-framework-6d7f5e4bc9b16cb5b6bc3ad2503f251977cbb2af.zip |
Eliminate unnecessary conversions of option keys
Change-Id: I5f3b267cec0357fe1a1c1a13bafdf3c1f3b6d426
Diffstat (limited to 'client/src/com')
-rw-r--r-- | client/src/com/vaadin/client/ui/VFilterSelect.java | 6 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index b83197ed2d..11f89ee232 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -147,8 +147,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * * @return The key of the item */ - public int getOptionKey() { - return Integer.parseInt(key); + public String getOptionKey() { + return key; } /** @@ -1281,7 +1281,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, newKey = ""; } else { // normal selection - newKey = String.valueOf(suggestion.getOptionKey()); + newKey = suggestion.getOptionKey(); } String text = suggestion.getReplacementString(); diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java index e96d27032b..7c82db1b00 100644 --- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -131,8 +131,7 @@ public class ComboBoxConnector extends AbstractFieldConnector implements if (optionUidl.hasAttribute("selected")) { if (!getWidget().waitingForFilteringResponse || getWidget().popupOpenerClicked) { - String newSelectedOptionKey = Integer.toString(suggestion - .getOptionKey()); + String newSelectedOptionKey = suggestion.getOptionKey(); if (!newSelectedOptionKey .equals(getWidget().selectedOptionKey) || suggestion.getReplacementString().equals( |