FlowingCode / GridExporterAddon

Other
10 stars 8 forks source link

Compilation error / Vaadin 24.0.0.beta1 #51

Closed javier-godoy closed 1 year ago

javier-godoy commented 1 year ago
Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project grid-exporter-addon: Compilation failure: 
Error:  /src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporter.java:[196,12] cannot find symbol
Error:    symbol:   method getValueProviders()
Error:    location: variable r of type com.vaadin.flow.data.renderer.Renderer<T>

https://github.com/FlowingCode/GridExporterAddon/blob/47ea77dd06dfeca16334806fc61f0f78b4665a7f/src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporter.java#L196-L198

javier-godoy commented 1 year ago

The method had been deprecated in Vaadin 23.1 and was removed in Vaadin 24.0.0.alpha8 https://github.com/vaadin/flow-components/pull/4471

dominik42 commented 1 year ago

As a workaround, you have to prevent the line GridExporter.java : 199 either by providing a value provider for EVERY column or by excluding certain columns EXPLICITELY from using by the grid exporter:

var colXYZ = grid.addColumn(...);
// exclude the column ...
exporter.setExportColumn(colXYZ, false);
// ... or provide value provider for EVERY column
exporter.setExportValue(colXYZ, item -> item.valueABC());

With those modification, I could use the addon in version 1.4.1 and 1.5.0-SNAPSHOT (from maven repository https://maven.flowingcode.com/snapshots)