I would like to sort ComboBox items by caption names. What is the best approach to achieve this? Now I load all items from DB in form of ArrayList, transform it into ListDataProvider and set it in ComboBox.
It would be then prefrable to have the caption names in DataProvider as well. Then you can sort is using addSortOrder(…) method. If you need custom sorting, you need to use custom comparator and add it with addSortComparator(…), you can find further specs here:
https://vaadin.com/api/8.0.5/com/vaadin/data/provider/ListDataProvider.html