0
가능한 중복 :
Bold second item of a selectOneMenutr : selectOneChoice의 개별 항목에 색상을 지정하는 방법은 무엇입니까?
가 드롭 다운 선택 항목에/색상 항목을 페인트 할 수 있습니까?
내 코드 :
<tr:selectOneChoice value="#{bean.entity}>
<f:selectItems value="#{bean.entities}" />
</tr:selectOneChoice>
백업 콩 :
public List<SelectItem> getEntities() {
List<SelectItem> entities = new ArrayList();
SelectItem item = new SelectItem();
item.setValue("value");
item.setLabel("label");
entities.add(item);
}
내가 항목에 styleclass을 추가 할 수 있습니다. 누구든지 그렇게하는 법을 알고 있습니까?