In the showcase, it is said that it is possible to format a SelectItem to make it for example show the values in Red and this works in a normal selectItem.
The problem is when the SelectItem MultipleAppearance is set to MultipleAppearance.GRID, the format disappear and the values are shown in Black, why?
This works:
This doesn't work:
The problem is when the SelectItem MultipleAppearance is set to MultipleAppearance.GRID, the format disappear and the values are shown in Black, why?
This works:
Code:
SelectItem selectItem2 = new SelectItem(); selectItem2.setTitle("Select"); selectItem2.setMultiple(true); selectItem2.setHint("<nobr>A combobox with styled entries</nobr>"); selectItem2.setValueMap("<span style='color:#FF0000'>Red</span>", "<span style='color:#00FF00;'>Green</span>", "<span style='color:#0000FF;'>Blue</span>");
Code:
SelectItem selectItem2 = new SelectItem(); selectItem2.setTitle("Select"); selectItem2.setMultiple(true); selectItem2.setMultipleAppearance(MultipleAppearance.GRID); selectItem2.setHint("<nobr>A combobox with styled entries</nobr>"); selectItem2.setValueMap("<span style='color:#FF0000'>Red</span>", "<span style='color:#00FF00;'>Green</span>", "<span style='color:#0000FF;'>Blue</span>");