return Collections.singleton(value).iterator();
}
private Iterator<SelectItem> newSelectItemsIterator(final UISelectItems component) {
final String var = (String) component.getAttributes().get("var");
SelectItems selectItems = new SelectItems(component.getValue()) {
@Override
protected SelectItem convertToSelectItem(final Object value) {
return FacesUtils.doWithRequestScopeVariable(SelectItemsIterator.this.context, var, value,
new Callable<SelectItem>() {
public SelectItem call() throws Exception {
Map<String, Object> attrs = component.getAttributes();
Object itemValue = firstNonNullValue(attrs.get("itemValue"), value);
String itemLabel = getStringValue(firstNonNullValue(attrs.get("itemLabel"), itemValue));
SelectItem item = new SelectItem(itemValue, itemLabel);
item.setDescription(getStringValue(attrs.get("itemDescription")));
item.setEscape(getBooleanValue(attrs.get("itemLabelEscaped")));
item.setDisabled(getBooleanValue(attrs.get("itemDisabled")));
item.setNoSelectionOption(getBooleanValue(firstNonNullValue(
attrs.get("noSelectionOption"), attrs.get("noSelectionValue"))));
return item;
}
});
}
};
return selectItems.iterator();
}