Skip to content
Snippets Groups Projects
Commit 5392ac80 authored by Sylvain Mainguy's avatar Sylvain Mainguy
Browse files

No commit message

No commit message
parent c9de558e
Branches
No related tags found
No related merge requests found
......@@ -55,17 +55,12 @@ public class ComboBox extends CometeComposite<Combo> implements IComboBox, Selec
@Override
public void setText(String text) {
// sets the currently displayed item
// sets the currently displayed item to text
getControl().deselectAll();
if (text != null) {
String[] displayedList = getDisplayedList();
if (displayedList.length > 0) {
for (int i = 0; i < displayedList.length; i++) {
if (displayedList[i].equals(text)) {
getControl().select(i);
break;
}
}
int index = getControl().indexOf(text);
if (index != -1) {
getControl().select(index);
}
}
fireSelectedItemChanged(new EventObject(this));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment