Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
CustomField with validation
Hello,
I'm trying to create a CustomField. This CustomField contains a TextField and a Button... The button can only be clicked if there is a value in the textfield so I add a NullValidator on the TextField.
It works when the screen loads but when I add a value in the field; it stay marked as Invalid.
The Textfield is builded like
textField = new TextField();
textField.setNullRepresentation("");
textField.setImmediate(true);
textField.addValidator(new NullValidator("This field is required", false));
How can I make the validation work on the field?
Thank you
Note that the NullValidator can not fail for user input if you have not set setNullSettingAllowed(true) for the TextField.
However, that should not cause the invalid status to stay as such, and I'm not immediately sure why that would occur in your code.