dimanche 4 juin 2023

Vaadin grid becomes empty, when using ComboboxRenderer

Vaadin version is 8.10.1

Adding the addon:

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>grid-renderers-collection-addon</artifactId>
        <version>2.7.0</version>
    </dependency>

and in the grid defining the renderer like that:

    CheckboxRenderer renderer = new CheckboxRenderer<>(Payment::setSelectedToMultiAction);
    paymentGrid.addColumn(Payment::getSelectedToMultiAction)
            .setRenderer(renderer)
            .setCaption("Selection");

But the grid shown empty. With no error in Chrome's js console:

enter image description here

If we remove the renderere, everything is displayed.

    CheckboxRenderer renderer = new CheckboxRenderer<>(Payment::setSelectedToMultiAction);
    paymentGrid.addColumn(Payment::getSelectedToMultiAction)
    //        .setRenderer(renderer)
            .setCaption("Selection");



Aucun commentaire:

Enregistrer un commentaire