List allModVal = DAOFactory.getModalitiesValueDAO()
.loadAllModalitiesValue();
if (AdmintoolsConstants.DETAIL_INS.equalsIgnoreCase(mod)) {
Iterator i = allModVal.iterator();
while (i.hasNext()) {
ModalitiesValue value = (ModalitiesValue) i.next();
String valueLabel = value.getLabel();
if (valueLabel.equals(label)) {
HashMap params = new HashMap();
params.put(AdmintoolsConstants.PAGE,
ListLovsModule.MODULE_PAGE);
EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "label", "1024",
new Vector(), params);
errorHandler.addError(error);
}
}
} else {
String currentId = (String) request.getAttribute("id");
Iterator i = allModVal.iterator();
while (i.hasNext()) {
ModalitiesValue value = (ModalitiesValue) i.next();
String valueLabel = value.getLabel();
String valueId = value.getId().toString();
if (valueLabel.equals(label)
&& (!currentId.equalsIgnoreCase(valueId))) {
HashMap params = new HashMap();
params.put(AdmintoolsConstants.PAGE,
ListLovsModule.MODULE_PAGE);