Hi, I have some from and some textfield on it:
TextField taxNumber = new TextField();
taxNumber.setPrefixComponent(VaadinIcon.BARCODE.create());
accountApplicationBinder
.forField(taxNumber)
.withValidator(new StringLengthValidator(....
And I have some validation logic in Listener:
taxNumber.addBlurListener(event -> {
String localResult = "";
InfoResult ir = ks.loadInfo(taxNumber.getValue());
if ((ir.errorText == null) && (!ir.name.isEmpty())) {
} else {
localResult = "";
taxNumber.setInvalid(true);
taxNumber.setErrorMessage("Not valid tax - " + accountApplicationBinder.isValid());
}
}
taxNumberStatusLabel.setText(localResult);
});
And I want to get behavior like a “.withValidator… return not valid” in my submit button listener. Another words: i want to have my submit button not working then taxNumber.addBlurListener return not valid result. How I can do it???