Class MultiSheetExportSettings

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.MultiSheetExportSettings
All Implemented Interfaces:
HasHandlers

public class MultiSheetExportSettings extends DataClass
Per-call configuration for Canvas.exportDescendantData().
See Also:
  • Constructor Details

    • MultiSheetExportSettings

      public MultiSheetExportSettings()
    • MultiSheetExportSettings

      public MultiSheetExportSettings(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static MultiSheetExportSettings getOrCreateRef(JavaScriptObject jsObj)
    • setCallback

      public MultiSheetExportSettings setCallback(String callback)
      Fired once the export request has been submitted. The workbook downloads through the browser's file transport, which reports nothing back to the page, so this callback does not indicate the download has completed — only that it was initiated.
      Parameters:
      callback - New callback value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getCallback

      public String getCallback()
      Fired once the export request has been submitted. The workbook downloads through the browser's file transport, which reports nothing back to the page, so this callback does not indicate the download has completed — only that it was initiated.
      Returns:
      Current callback value. Default value is null
      See Also:
    • setExportAllFields

      public MultiSheetExportSettings setExportAllFields(Boolean exportAllFields)
      Export every data field of each component's records, rather than only the columns the component shows: the DataSource's default binding plus the component's own fields — the DataBoundComponent.useAllDataSourceFields rule — with every admitted field receiving the same name/ID pairing and valueMap treatment as the default export. Specifically:
      • a DataSource field that is not hidden exports (detail fields included), and a DataSource-hidden field exports only when the component's own fields specify it — specifying a field reveals it;
      • a component field declared hidden:true stays out, but a column the user merely hid at runtime is still a field of the component and exports;
      • canExport:false or canView:false fields never export;
      • a DataSourceField.displayField sibling appears once, as its foreign key's name column, whatever its own hidden setting;
      • primary keys, and the foreign keys of exported related fields, join the ID block;
      • colliding titles are prefixed with their relationship ("Delivery Location Name"), so no sheet carries several columns with one title.
      Off by default; the export dialog offers it as a per-run checkbox. Aggregated components ignore the setting (their columns are the aggregation's), and scheduled and shared exports use the default.
      Parameters:
      exportAllFields - New exportAllFields value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getExportAllFields

      public Boolean getExportAllFields()
      Export every data field of each component's records, rather than only the columns the component shows: the DataSource's default binding plus the component's own fields — the DataBoundComponent.useAllDataSourceFields rule — with every admitted field receiving the same name/ID pairing and valueMap treatment as the default export. Specifically:
      • a DataSource field that is not hidden exports (detail fields included), and a DataSource-hidden field exports only when the component's own fields specify it — specifying a field reveals it;
      • a component field declared hidden:true stays out, but a column the user merely hid at runtime is still a field of the component and exports;
      • canExport:false or canView:false fields never export;
      • a DataSourceField.displayField sibling appears once, as its foreign key's name column, whatever its own hidden setting;
      • primary keys, and the foreign keys of exported related fields, join the ID block;
      • colliding titles are prefixed with their relationship ("Delivery Location Name"), so no sheet carries several columns with one title.
      Off by default; the export dialog offers it as a per-run checkbox. Aggregated components ignore the setting (their columns are the aggregation's), and scheduled and shared exports use the default.
      Returns:
      Current exportAllFields value. Default value is null
      See Also:
    • setExportFilename

      public MultiSheetExportSettings setExportFilename(String exportFilename)
      Base name for the downloaded file (the .xlsx extension is appended). When unset, a filesystem-safe name is derived from title.
      Parameters:
      exportFilename - New exportFilename value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getExportFilename

      public String getExportFilename()
      Base name for the downloaded file (the .xlsx extension is appended). When unset, a filesystem-safe name is derived from title.
      Returns:
      Current exportFilename value. Default value is null
      See Also:
    • setIncludeHidden

      public MultiSheetExportSettings setIncludeHidden(Boolean includeHidden)
      By default only visible components are exported — the export captures the view the user is looking at. Set this to export hidden eligible components as well.
      Parameters:
      includeHidden - New includeHidden value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getIncludeHidden

      public Boolean getIncludeHidden()
      By default only visible components are exported — the export captures the view the user is looking at. Set this to export hidden eligible components as well.
      Returns:
      Current includeHidden value. Default value is null
      See Also:
    • setIncludeIDColumns

      public MultiSheetExportSettings setIncludeIDColumns(Boolean includeIDColumns)
      A grid sheet pairs every resolvable name with its underlying key: foreign keys export the related record's name under the field's own title, and the raw ids and codes form a block of columns at the right of the sheet — each displayed foreign key's id (titled "<field title> ID"), each valueMap field's stored code (titled "<field title> Code"), plus the record's primary key even when not displayed. Names are not unique, so these keys are what joins one sheet to another.

      The block is on by default; set includeIDColumns:false to export only the readable columns. Charts control their equivalent raw-code column via ChartExportSettings.includeCodes.

      Parameters:
      includeIDColumns - New includeIDColumns value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getIncludeIDColumns

      public Boolean getIncludeIDColumns()
      A grid sheet pairs every resolvable name with its underlying key: foreign keys export the related record's name under the field's own title, and the raw ids and codes form a block of columns at the right of the sheet — each displayed foreign key's id (titled "<field title> ID"), each valueMap field's stored code (titled "<field title> Code"), plus the record's primary key even when not displayed. Names are not unique, so these keys are what joins one sheet to another.

      The block is on by default; set includeIDColumns:false to export only the readable columns. Charts control their equivalent raw-code column via ChartExportSettings.includeCodes.

      Returns:
      Current includeIDColumns value. Default value is null
      See Also:
    • setLabels

      public MultiSheetExportSettings setLabels(Map labels)
      Per-call overrides for the cover and caption label strings. Property names and defaults come from the corresponding canvas attributes — Canvas.filtersAppliedTitle, Canvas.filterConditionTitle, Canvas.filterAppliesToTitle, Canvas.allSheetsMessage, Canvas.noFiltersAppliedMessage, Canvas.asDisplayedMessage and Canvas.asDisplayedPartialMessage; set those attributes instead to change the wording for every export.
      Parameters:
      labels - New labels value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getLabels

      public Map getLabels()
      Per-call overrides for the cover and caption label strings. Property names and defaults come from the corresponding canvas attributes — Canvas.filtersAppliedTitle, Canvas.filterConditionTitle, Canvas.filterAppliesToTitle, Canvas.allSheetsMessage, Canvas.noFiltersAppliedMessage, Canvas.asDisplayedMessage and Canvas.asDisplayedPartialMessage; set those attributes instead to change the wording for every export.
      Returns:
      Current labels value. Default value is null
      See Also:
    • setMaxExportRows

      public MultiSheetExportSettings setMaxExportRows(Integer maxExportRows)
      Maximum rows a client-executed fetch may export. When a component's fetch would exceed it, the export is refused with Canvas.exportRowLimitMessage before any download begins. Fetches executed by the Smart GWT Server are bounded by the server's own configured limit instead.
      Parameters:
      maxExportRows - New maxExportRows value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getMaxExportRows

      public Integer getMaxExportRows()
      Maximum rows a client-executed fetch may export. When a component's fetch would exceed it, the export is refused with Canvas.exportRowLimitMessage before any download begins. Fetches executed by the Smart GWT Server are bounded by the server's own configured limit instead.
      Returns:
      Current maxExportRows value. Default value is null
      See Also:
    • setTitle

      public MultiSheetExportSettings setTitle(String title)
      Title shown on the workbook's cover sheet. When unset, falls back to Canvas.exportDefaultTitle.
      Parameters:
      title - New title value. Default value is null
      Returns:
      MultiSheetExportSettings instance, for chaining setter calls
      See Also:
    • getTitle

      public String getTitle()
      Title shown on the workbook's cover sheet. When unset, falls back to Canvas.exportDefaultTitle.
      Returns:
      Current title value. Default value is null
      See Also: