* @return list with unhandled errors
*/
public List<ValidationError> handleValidationErrors(List<ValidationError> errors) {
List<ValidationError> unhandled = new ArrayList<ValidationError>();
unhandled.addAll(errors);
IManagedForm form = getManagedForm();
if (form != null) {
form.getMessageManager().removeAllMessages();
_hasError = false;
_canLeave = true;
if (errors != null) {
Iterator<ValidationError> it = errors.iterator();
while (it.hasNext()) {
ValidationError error = it.next();
String[] propHints = error.getPropertyHints();
for (int i = 0; i < propHints.length; i++) {
String propHint = propHints[i];
Control control = _fields.get(propHint);
if (control != null) {
addError(form.getMessageManager(), propHint, error, control);
unhandled.remove(error);
}
}
}
}