I have the following Code
private ComboBox<String> cbYear = new ComboBox<>("Jahr *");
private Button refreshBtn = new Button("Lade Daten...");
private Binder<DateSelection> binder = new Binder<>(DateSelection.class);
private DateSelection dateSelection = new DateSelection();
public MainView() {
//.. some Code ...
binder.forField(cbYear).bind(DateSelection::getYear, DateSelection::setYear);
binder.setBean(dateSelection);
It caueses an error if I don’t select something in the combobox. But I want the field to be not required. How can I handle this?