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.
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: