重複の可能性:
selectOneMenu の太字の 2 番目の項目
選択項目のドロップダウンでアイテムをペイント/色付けすることはできますか?
私のコード:
<tr:selectOneChoice value="#{bean.entity}>
<f:selectItems value="#{bean.entities}" />
</tr:selectOneChoice>
バッキング Bean:
public List<SelectItem> getEntities() {
List<SelectItem> entities = new ArrayList();
SelectItem item = new SelectItem();
item.setValue("value");
item.setLabel("label");
entities.add(item);
}
アイテムにスタイルクラスを追加したい。誰もそれを行う方法を知っていますか?