0
創建selectOneMenu用於UIComponent uicomponent從我創建了一個selectOneMenu用於服務器端
SelectOneMenu value = new SelectOneMenu();
我要插入的selectOneMenu用於一些selectItems的。 我想這
String[] options = question.getOptions().split(",");
for(String option : options){
SelectItem selectItem = new SelectItem();
selectItem.setLabel(option);
selectItem.setValue(option);
value.getChildren().add(selectItem);
}
但是,當我加我收到錯誤添加選擇信息(uicomponent)不適用於參數的SelectItem。怎麼辦,有什麼建議?