0
可能重複:
Bold second item of a selectOneMenu如何爲tr單個項目着色:selectOneChoice?
是否有可能油漆/顏色項目在選擇項目下拉?
我的代碼:
<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);
}
我要的styleClass添加到該項目。任何人都知道如何做到這一點?