Limitations

Exporting Tables with Generated Columns

If you use custom generated columns in the Table, GroupTable, or TreeTable component, their content is not exported by default.

To define values for columns, use the addColumnValueProvider() method of the ExportAction class.

In the example below, the columnGenerator is used for the isEmail column. To define values to be exported via ExcelExportAction, add a function to get value from the column:

@Named("customersTable.excel")
protected ExcelExportAction customersTableExcel;

@Subscribe
protected void onInit(InitEvent event) {
    customersTableExcel.addColumnValueProvider("isEmail", context -> {
        Customer customer = context.getEntity();
        return customer.getEmail() != null;
    });
}

@Install(to = "customersTable.isEmail", subject = "columnGenerator")
protected Component customersTableIsEmailColumnGenerator(Customer customer) {
    CheckBox isEmail = uiComponents.create(CheckBox.class);
    isEmail.setValue(customer.getEmail() != null);
    return isEmail;
}

Exporting Tables with Paging

If some export action is invoked for a table with paging, and a user selects All rows export, the export action cannot by design output all rows, as it outputs only content of the table.