I have a Texfield that is binded to a property bean with a binder with asRequired method.
I saw the required indicator even though i set the requiredIndicatorVisible to false in the textField. Why?

Textfield name = new Textfield("name");

Binder<Person> binder = new Binder<>();
      .asRequired("You must write a name")

it’s by design. Here is an extract from javadocs of BindingBuilder interface

Sets the field to be required. This means two things:
1. the required indicator will be displayed for this field
2. the field value is validated for not being empty, i.e. that the field's value is not equal to what HasValue.getEmptyValue() returns

If you want to hide the indicator move name.setRequiredIndicatorVisible(false) after the binding code.


Thank’s a lot.
It was logic…