Sorting ComboBox items

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: