Button saveButton = new Button("Save");
saveButton.addClickListener(buttonClickEvent -> {
final BinderValidationStatus<Customer> validate = this.binder.validate();
UIUtils.write(validate.getBeanValidationErrors());
final BinderValidationStatus<BaseAbstractEntityAddress> validate1 = this.addressForm.getBinder().validate();
UIUtils.write(validate1.getBeanValidationErrors());
if (this.binder.isValid() && this.addressForm.getBinder().isValid()) {
Customer customer = new Customer();
this.binder.writeBeanIfValid(customer);
this.addressForm.getBinder().writeBeanIfValid(customer.getBaseAbstractEntityAddress());
customer = customerService.saveCustomer(customer);
refreshGrid();
UIUtils.showNotification(customer.getId() + " created");
} else {
UIUtils.showNotification(" No Customer created");
}
From the above, I do not see any error is thrown from validate method so it should go to the if block but it is not. Not sure what is wrong here though no validation error