2013-01-01 1 views
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을 추가 할 수 있습니다. 누구든지 그렇게하는 법을 알고 있습니까?

답변

0

아니요, 일반적으로 불가능하며 렌더링은 브라우저에 따라 다릅니다.
절대적으로 필요한 경우 <div>을 만들고 드롭 다운 모양으로 스타일을 지정해야합니다.

관련 문제