i'm trying to use this plugin with my vaadin pro grid but it doesn't work, i have always this error:
java.lang.IllegalStateException: It's not possible to obtain a value for column, please set a value provider by calling setExportValue()
i have only the setItems of the grid after a button clicking and anything different.
here my code:
gridChildrens.addColumn(new ComponentRenderer<>(p -> { return addImageSex(p); })).setAutoWidth(true);childrenColumn = gridChildrens.addColumn(createNameColumnRender()).setHeader(“Bambino”).setAutoWidth(true).setSortable(true)
.setComparator(AttendanceRegistry::getLastName).setComparator(AttendanceRegistry::getFirstName);dayOne = gridChildrens.addEditColumn(AttendanceRegistry::getDayOneBoolean, LitRenderer.<AttendanceRegistry>of(booleanPlaceHolder)
.withProperty(“check”, AttendanceRegistry::getDayOne)).checkbox((item, newValue) -> {
item.setDayOne(newValue);
}).setHeader(“Giorno 1”);dayTwo = gridChildrens.addEditColumn(AttendanceRegistry::getDayTwoBoolean, LitRenderer.<AttendanceRegistry>of(booleanPlaceHolder)
.withProperty(“check”, AttendanceRegistry::getDayTwo)).checkbox((item, newValue) -> {
item.setDayTwo(newValue);
}).setHeader(“Giorno 2”);dayThree = gridChildrens.addEditColumn(AttendanceRegistry::getDayThreeBoolean, LitRenderer.<AttendanceRegistry>of(booleanPlaceHolder)
.withProperty(“check”, AttendanceRegistry::getDayThree)).checkbox((item, newValue) -> {
item.setDayThree(newValue);
}).setHeader(“Giorno 3”);dayFour = gridChildrens.addEditColumn(AttendanceRegistry::getDayFourBoolean, LitRenderer.<AttendanceRegistry>of(booleanPlaceHolder)
.withProperty(“check”, AttendanceRegistry::getDayFour)).checkbox((item, newValue) -> {
item.setDayFour(newValue);
}).setHeader(“Giorno 4”);dayFive = gridChildrens.addEditColumn(AttendanceRegistry::getDayFiveBoolean, LitRenderer.<AttendanceRegistry>of(booleanPlaceHolder)
.withProperty(“check”, AttendanceRegistry::getDayFive)).checkbox((item, newValue) -> {
item.setDayFive(newValue);
}).setHeader(“Giorno 5”);gridChildrens.addThemeVariants(GridVariant.LUMO_ROW_STRIPES);
GridExporter<AttendanceRegistry> exporter = GridExporter.createFor(gridChildrens);
exporter.setExportValue(childrenColumn, item->“”+item.getPersonChildRegistryId().getChildName());
exporter.setTitle(“Registro presenze”);
exporter.setFileName(“GridExport” + new SimpleDateFormat(“yyyyddMM”).format(Calendar.getInstance().getTime()));