我有一个ice:selectOneMenu
组件,需要获取从页面中选择的 id 和 value:
<ice:selectOneMenu partialSubmit="true"
value="#{bean.selectedType}" valueChangeListener="#{bean.listenerSelectedType}">
<f:selectItems value="#{bean.typeValues}"/>
<ice:selectOneMenu/>
public List<?> getTypeValues(){
List<SelectItem> returnList = new ArrayList<SelectItem>();
...
//SelectItem item = new SelectItem(id, label);
SelectItem item = new SelectItem("A", "B");
returnList.add(item);
}
public void listenerSelectedType(ValueChangeEvent event) {
...
//The event only has the id ("A")
//How can I get the label ("B") that is in the page?
}