I am looking for a way to add icons on to items in a listSelect but found no way to do it.
When trying it with an ItemIconGenerator it says: “The method setItemIconGenerator(IconGenerator) from the type AbstractListing is not visible”
Why is that and is there another way to add icons to a ListSelect?
The setItemIconGenerator is protected method in AbstractListing, which is implemented as public in implementing classes (like ComboBox). So if the implementing classs is not supporting this feature, you will get this “is not visible” error.
You can set an icon for each item with setItemIconGenerator(), in a fashion similar to captions. Notice, however, that icons are not supported in NativeSelect, TwinColSelect, and some other selection components and modes. This is because HTML does not support images inside the native select elements."