ComboBox sort

Hei
I have this set of ComboBox:

A ComboBox gets name:

ComboBoxes are populated from a JSONArray:

Question:
Items of four ComboBoxes should be sort.
How to sort Items of a ComboBox to descending order?
An example:

Tapani

Hi, Tapani!

ComboBoxes have IndexedContainers by default, so you could add the items in the order you want them. IndexedContainer also happens to implement Container.Sortable, which means that you can use the sort() method in
IndexedContainer
. (scroll down for the documentation, I can’t link directly to it since this forum software doesn’t accept ] in URL:s).

HTH,
/Jonatan