JochenW
JochenW

Reputation: 1053

What is the analogon of a ComponentError in Vaadin 24

in Vaadin 8, we had the so-called component errors, which I found to be very useful. (See Vaadin 8 docs 1) But how are we supposed to handle invalid input in Vaadin 24?

Upvotes: 0

Views: 35

Answers (2)

cfrick
cfrick

Reputation: 37073

If you really want to roll your own (or can not use the Binder (see other answer), the successor is the interface HasValidation which is in the class hierarchy for basically all the fields coming with the core.

But this no longer has different "levels" of errors. The field is either valid or shows an "error string"; which is usually enough.

Upvotes: 1

Simon Martinelli
Simon Martinelli

Reputation: 36223

In Vaadin 24 you can use the Binder and then the validation error will be displayed by the input field.

https://vaadin.com/docs/latest/binding-data/components-binder

Upvotes: 2

Related Questions