Hi,
I use a comboboxItem filled in this way:
I also added a changeHandler to the combobox.
My problem is, that the onChange Method is called any time, the user typs in a character in the combobox, even if the value he typed is not in the list of the combobox.
My question, can I get a list of all items in the combobox, so that i can do something like this:
I use a comboboxItem filled in this way:
Code:
String[] values = new String[2]; values[0] = "Item1"; values[1] = "Item2"; combobox.setValueMap(values);
My problem is, that the onChange Method is called any time, the user typs in a character in the combobox, even if the value he typed is not in the list of the combobox.
My question, can I get a list of all items in the combobox, so that i can do something like this:
Code:
public void onChanged(ChangedEvent event) {
if(isItemValid(combobox.getDisplayValue())){
//do something with the correct item
}else{
//do nothing
}
}
Comment