I am using the GWT Editor and javax validation.
I have a model bean with a child bean like so ->
public interface BeanA {
@Valid
BeanB getBeanB();
void setBeanB(BeanB b);
}
public interface BeanB {
@NotEmpty
public String getValue();
public void setValue(String value);
}
There is a Widget that implements the LeafValueEditor, HasEditorErrors interfaces.
The value seems to be binding with no issue.
public class MyWidget extends Composite implements
LeafValueEditor<String>, HasEditorErrors<String>{
...
@Override
public void showErrors(List<EditorError> errors) {
// Even though the error is flagged
// the errors collection does not contain it.
}
}
When I call validate and the widget getValue returns null, the ConstraintViolation collection contains the error but when showErrors is called, the List is empty.
Any idea why the violation is found but then does not make it to the widget showErrors?
This appears to be a GWT 2.4 issue. I did the same example in GWT 2.5 and the path was correctly set and the error collection was correct.