Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
ComboBox issues when paging is disabled
With Vaadin 6 (I currently use 6.7.9), ComboBox paging can be disabled using this mechanism:
public class MyComboBox extends ComboBox {
public MyComboBox() {
pageLength = 0;
}
}
This has, however, few consequencies:
1) When you change the selected option using arrow keys from keyboard and press tabulator key to move to the next field, your new selection is not applied.
2) Filtering does not apply to ComboBox items anymore
Case 1 seems like a bug to me. If you omit the "pageLength = 0;" statement, leaving option list with tabulator works as one might expect. However, if you take a good look at the combobox at the moment when you press the tabulator key, you see option values flashing in the combobox before your selection gets applied. If you use mouse button for selecting, this does not occur. So, I guess there are some tricks that get performed just for keyboard navigation, which somehow mess up with the selection when paging is disabled.
Case 2 is trickier to define, is it a bug or feature? The filtering does not apply because of this code in Select.java class:
protected List<?> getOptionsWithFilter(boolean needNullSelectOption) {
Container container = getContainerDataSource();
if (pageLength == 0) {
// no paging: return all items
filteredSize = container.size();
return new ArrayList<Object>(container.getItemIds());
}
Should these features (paging and filtering) really be tied together this way or not? Or is this just something that has been left this way because this feature is not so important or commonly used? Will this work differently in Vaadin 7?
Regards,
Sami