]> source.dussan.org Git - vaadin-framework.git/commitdiff
Eliminate unnecessary conversions of option keys
authorHenri Sara <hesara@vaadin.com>
Fri, 10 May 2013 10:51:31 +0000 (13:51 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 14 May 2013 13:14:03 +0000 (13:14 +0000)
Change-Id: I5f3b267cec0357fe1a1c1a13bafdf3c1f3b6d426

client/src/com/vaadin/client/ui/VFilterSelect.java
client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java

index b83197ed2d464fb09ab85d1da5859a2173b2a6ed..11f89ee232d304245be69fc509097f8d740d5c33 100644 (file)
@@ -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();
index e96d27032bdf013109ce5664bbd4f8973253c6f9..7c82db1b004590fa369026d277c69f8d732281e4 100644 (file)
@@ -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(