Class JsonExporter
java.lang.Object
io.jmix.gridexportflowui.exporter.AbstractDataGridExporter<JsonExporter>
io.jmix.gridexportflowui.exporter.json.JsonExporter
- All Implemented Interfaces:
DataGridExporter
@Component("grdexp_JsonExporter")
@Scope("prototype")
public class JsonExporter
extends AbstractDataGridExporter<JsonExporter>
Use this class to export
Just create an instance of
DataGrid
into JSON format.
Just create an instance of
ExportAction
with withExporter
method.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.gridexportflowui.exporter.DataGridExporter
DataGridExporter.ColumnValueContext
-
Field Summary
Modifier and TypeFieldDescriptionprotected Function<com.google.gson.GsonBuilder,
com.google.gson.GsonBuilder> protected Metadata
Fields inherited from class io.jmix.gridexportflowui.exporter.AbstractDataGridExporter
columnValueProviders, coreProperties, datatypeRegistry, fileName, flowuiProperties, messages, messageTools, metadataTools
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.gson.Gson
void
exportDataGrid
(Downloader downloader, com.vaadin.flow.component.grid.Grid<Object> dataGrid, ExportMode exportMode) downloaddataGrid
content viadownloader
protected Collection<Object>
getDataGridItems
(com.vaadin.flow.component.grid.Grid<Object> dataGrid) protected Collection<Object>
getItems
(com.vaadin.flow.component.grid.Grid<Object> dataGrid, ExportMode exportMode) getLabel()
protected JsonExporter
withGsonConfigurator
(Function<com.google.gson.GsonBuilder, com.google.gson.GsonBuilder> gsonConfigurer) Configure Gson builder for exportMethods inherited from class io.jmix.gridexportflowui.exporter.AbstractDataGridExporter
addColumnValueProvider, createInstanceContainerProvider, formatValue, formatValue, getColumnValue, getColumnValueProvider, getFileName, getFileName, getMetaClassName, removeColumnValueProvider, setCoreProperties, setDatatypeRegistry, setFileName, setFlowuiProperties, setMessages, setMessageTools, setMetadataTools, withFileName
-
Field Details
-
metadata
-
gsonConfigurer
-
-
Constructor Details
-
JsonExporter
public JsonExporter()
-
-
Method Details
-
withGsonConfigurator
protected JsonExporter withGsonConfigurator(Function<com.google.gson.GsonBuilder, com.google.gson.GsonBuilder> gsonConfigurer) Configure Gson builder for export- Parameters:
gsonConfigurer
- Gson configurator function- Returns:
- exporter instance
-
exportDataGrid
public void exportDataGrid(Downloader downloader, com.vaadin.flow.component.grid.Grid<Object> dataGrid, ExportMode exportMode) Description copied from interface:DataGridExporter
downloaddataGrid
content viadownloader
-
createGsonForSerialization
protected com.google.gson.Gson createGsonForSerialization() -
getItems
protected Collection<Object> getItems(com.vaadin.flow.component.grid.Grid<Object> dataGrid, ExportMode exportMode) -
getDataGridItems
-
getLabel
- Returns:
- exporter label
-