if (selectItems != null && !selectItems.isEmpty() && isNothingSelected)
{
// now check if the first item is already a blank item.
// if it isn't, render a blank item, using the
// noSelectionLabel attribute value as the itemLabel.
SelectItem firstItem = selectItems.get(0);
Object firstItemValue = firstItem.getValue();
if (!("".equals(firstItemValue)))
{
Object label = component.getAttributes().get(
CoreSelectOneChoice.UNSELECTED_LABEL_KEY);
String noSelectionLabel = (label != null) ? label.toString() : "";
SelectItem item = new SelectItem("", noSelectionLabel, "", false);
renderSelectItem(context, node, component, item,
"", false, false, 0);
}