/* (non-Javadoc)
* @see org.openntf.domino.design.FacesConfig.ManagedBean#setListEntries(java.util.Collection)
*/
public void setListEntries(final Collection<?> listEntries) {
XMLNode listEntriesNode = node_.selectSingleNode("list-entries");
String valueClassName = getListValueClassName();
if (listEntriesNode != null) {
node_.removeChild(listEntriesNode);
}
listEntriesNode = node_.addChildElement("list-entries");
XMLNode valueClassNode = listEntriesNode.addChildElement("value-class");
valueClassNode.setText(valueClassName);
for (Object entry : listEntries) {
if (entry == null) {
listEntriesNode.addChildElement("null-value");
} else {
XMLNode valueNode = listEntriesNode.addChildElement("value");
valueNode.setText(String.valueOf(entry));
}
}
// Clear out any map-entries, as they're mutually incompatible with list-entries
XMLNode mapEntries = node_.selectSingleNode("map-entries");
if (mapEntries != null) {
node_.removeChild(mapEntries);
}
}