Browse Source

Eliminate unnecessary conversions of option keys

Change-Id: I5f3b267cec0357fe1a1c1a13bafdf3c1f3b6d426
tags/7.0.6
Henri Sara 11 years ago
parent
commit
6d7f5e4bc9

+ 3
- 3
client/src/com/vaadin/client/ui/VFilterSelect.java View File

* *
* @return The key of the item * @return The key of the item
*/ */
public int getOptionKey() {
return Integer.parseInt(key);
public String getOptionKey() {
return key;
} }


/** /**
newKey = ""; newKey = "";
} else { } else {
// normal selection // normal selection
newKey = String.valueOf(suggestion.getOptionKey());
newKey = suggestion.getOptionKey();
} }


String text = suggestion.getReplacementString(); String text = suggestion.getReplacementString();

+ 1
- 2
client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java View File

if (optionUidl.hasAttribute("selected")) { if (optionUidl.hasAttribute("selected")) {
if (!getWidget().waitingForFilteringResponse if (!getWidget().waitingForFilteringResponse
|| getWidget().popupOpenerClicked) { || getWidget().popupOpenerClicked) {
String newSelectedOptionKey = Integer.toString(suggestion
.getOptionKey());
String newSelectedOptionKey = suggestion.getOptionKey();
if (!newSelectedOptionKey if (!newSelectedOptionKey
.equals(getWidget().selectedOptionKey) .equals(getWidget().selectedOptionKey)
|| suggestion.getReplacementString().equals( || suggestion.getReplacementString().equals(

Loading…
Cancel
Save