ComboBox highlighted as an error when using Binder in Vaadin

I have a ComboBox in my Vaadin application that is always highlighted as an error, even though the value is correct. If I remove the Binder, it works fine.

Here are my Java classes:


@SpringComponent
@RouteScope
@RouteScopeOwner(MainLayout.class)
public class SolicitudBean {
    private Producto producto;

    public SolicitudBean() {
        this.producto = new Producto();
    }

     
}
public class Producto {

    private String code;
    private String denominacion;
    private List<Plazo> plazos; 
    ......
   (methods)
    
}
@PageTitle(ConstantsSimulacion.PAGE_TITLE)
@Route(value = ConstantsSimulacion.ROUTE, layout = MainLayout.class)
@RolesAllowed("ADMIN")
@Uses(Icon.class)
public class SimulacionRequestView extends Composite<VerticalLayout> implements BeforeEnterObserver {

    private ComboBox<Producto> productoComboBox;
    private Binder<SolicitudBean> solicitudBinder;

    public SimulacionRequestView(
            UserService userService,
            SolicitudCalificarRestClientService solicitudCalificarRestClientService,
            ProductsRestClientService productsRestClientService,
            @Autowired @RouteScopeOwner(MainLayout.class) SolicitudBean solicitudBean) {

        this.solicitudBean = solicitudBean;

        this.solicitudBinder = new Binder<>(SolicitudBean.class);

        this.solicitudBinder.forField(this.productoComboBox)
               .bind(SolicitudBean::getProducto, SolicitudBean::setProducto);

        this.solicitudBinder.setBean(this.solicitudBean);

        this.productoComboBox = new ComboBox<Producto>(ConstantsSimulacion.DD_TIPO_DE_PRODUCTO);
        // ... (other configuration)
    }
}

The ComboBox is highlighted as an error when I use the Binder. If I remove the Binder, it works fine. Any idea why this might be happening? Am I missing something in my configuration?

Thanks!!!

Which version are you using?

Vaadin 24

There were some bug fixes recently, make sure to use the latest version.

I’m using 24.3.1

is there a way to use a snapshot version?

Why do you need a snapshot version when multiple higher versions are available?

Sorry. I thought my version was the last one

Now I’m using 24.3.5 and the error is still there.

Weird… can you share the full code of that form?

Here you have: https://raw.githubusercontent.com/AcquaNet/codeshared/main/SimulacionRequestView.java

It only happens with productoComboBox. In spite of I included this.productoComboBox.addFocusListener(comboBoxFocusEvent → {

        getUI().get().access(() -> {
            this.productoComboBox.setInvalid(false);
        });

    }); the error is still there.

thanks