subscribeToViewBeforePhase(PROCESS_VALIDATIONS, new Callback.Void() {
@Override
public void invoke() {
if (hasInvokedSubmit(parent)) {
SystemEventListener listener = new BeanValidationEventListener(validationGroups, disabled);
subscribeToViewEvent(PreValidateEvent.class, listener);
subscribeToViewEvent(PostValidateEvent.class, listener);
}
}
});