CheckboxGroup Binding does not work

Hi,

i have a strange problem. I have a Grid with new Employees here MitarbeiterClBasisc. You can select on in the Grid an then normal Binder Things happen. So lots of TextFields fill with Name, Birthday an so on. All works like a breeze but the CheckboxGroup binding does not work or at least does not show whats selected through the binder.

If i select an Employee from the Grid the Binder has the correct PsaList and the Checkboxgroup does also, i checked it with psa.getSelecteItems but the checkboxes are not checked.

private final Grid<MitarbeiterClBasics> clGrid = new Grid<>(MitarbeiterClBasics.class);
private final Binder<MitarbeiterClBasics> mitarbeiterClBasicsBinder = new Binder<>(MitarbeiterClBasics.class);



CheckboxGroup<ClPsa> psa = new CheckboxGroup<>("PSA");
psa.addThemeVariants(CheckboxGroupVariant.LUMO_VERTICAL);
psa.setDataProvider(new ListDataProvider<>(mitarbeiterChecklistService.ladePsa()));
psa.setItemLabelGenerator(ClPsa::getName);

mitarbeiterClBasicsBinder.forField(psa).bind(MitarbeiterClBasics::getPsaList, MitarbeiterClBasics::setPsaList);

clGrid.addSelectionListener(event -> {
            if(clGrid.asSingleSelect().getValue() != null) {
                MitarbeiterClBasics mclb = clGrid.asSingleSelect().getValue();
                mclb.setPsaList(mitarbeiterChecklistService.ladePsaMitarbeiterSetup(mclb));
                mitarbeiterClBasicsBinder.setBean(mclb);

                for (ClPsa p : mitarbeiterClBasicsBinder.getBean().getPsaList()){
                    Notification.show("Selected Items read from binder:"+p.getId()+" "+p.getName());
                }

                for (ClPsa ps : psa.getSelectedItems()){
                    Notification.show("Selected Items read from box:"+ps.getId()+" "+ps.getName());
                }

            }else{
                mitarbeiterClBasicsBinder.removeBean();
            }
        });

First thing that comes to mind: hash code/equals of your class ClPsa is not implemented correctly

Had not implemented this at all. Not it works like charm.