// note: the user can also edit an alternative that has already been added to the list
if ((alt.getId() == 0) &&
(!alternativesDefinition.getAlternatives().contains(alt))) {
String altName = alt.getName();
if ((altName.length() > 20)||
(null != alternativesDefinition.alternativeByName(altName))){
FacesMessages.instance()
.add(FacesMessage.SEVERITY_ERROR,
"Please provide a unique name which has no more than 20 characters.");
return;
}