}
List<Object> availableItems = new ArrayList<Object>(possibleValuesCollection);
List<DropDownItem> itemList = new ArrayList<DropDownItem>(availableItems.size());
for (Object itemObj : availableItems) {
DropDownItem item = createDropDownItem(context, itemObj);
itemList.add(item);
}
DropDownItem allRecordsItem = createDropDownItem(context, null);
String allRecordsCriterionName = filter.getAllRecordsText();
HtmlOutputText outputText = Components.createOutputText(context, allRecordsCriterionName);
String predefinedCriterionClass = getPredefinedCriterionClass(context, filter);
outputText.setStyleClass(predefinedCriterionClass);
allRecordsItem.getChildren().add(outputText);
itemList.add(0, allRecordsItem);
dropDownItems.setValue(itemList);
List<UIComponent> children = field.getChildren();
children.clear();
children.add(dropDownItems);