Hi everybody,
with Vaadin 6.8.3 and later, I noticed a problem in ComboBox: The filter does not work. When typing something into the combo I always get a blank dropdown list.
The problem is solved downgrading to Vaadin 6.8.2
This is the code I used:
myCombo = new ComboBox("MyCaption");
myCombo.setDescription("Seleziona un Cliente");
myCombo.setContainerDataSource(myApplication.getInstance().getDbHelp().getMyContainer());
myCombo.setItemCaptionPropertyId("myField");
myCombo.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS);
myCombo.setImmediate(true);
myCombo.setWidth("100.0%");
myCombo.setHeight("-1px");
myCombo.addListener(new Property.ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
if (myCombo.getValue() != null) {
...
}
}
}
Is it a bug or something changed in new releases?? Please help!
If a combo box is configured for the item property display mode, it adds and removes filters to the container dynamically. In that case, the problem could be related to your implementation of FreeformQueryDelegate.
If another mode is used or there are other reasons why the above does not work, filtering is performed in memory on the server.
In either case, putting breakpoints in ComboBox.getOptionsWithFilter(boolean) and ComboBox.getFilteredOptions() and tracing from there might help find the cause.
With Vaadin 6.8.5 I tried using TableQuery instead of FreeformQuery and I get that the dropdown list is not empty and it’s correctly filtered, but when clicking on an item the valueChange listener is not called if it’s the first item. Strange behaviour…