I’m extending Binder to focus on the first validation error like
@Override
public BinderValidationStatus<T> validate()
{
BinderValidationStatus<T> result = super.validate();
if (!result.getFieldValidationErrors().isEmpty())
{
HasValue<?> field = result.getFieldValidationErrors().iterator().next().getField();
if (field instanceof Focusable)
{
((Focusable) field).focus();
}
}
return result;
}
It looks to be the case but is there a guarantee that the errors will be in order of binding of the fields?