Class TableExporter<T extends javax.faces.component.UIComponent & UITable,D,O extends ExporterOptions>

java.lang.Object
org.primefaces.component.export.TableExporter<T,D,O>
All Implemented Interfaces:
Exporter<T>
Direct Known Subclasses:
DataTableExporter, TreeTableExporter

public abstract class TableExporter<T extends javax.faces.component.UIComponent & UITable,D,O extends ExporterOptions> extends Object implements Exporter<T>
  • Field Details

    • ALL_FACETS

      protected static final Set<TableExporter.FacetType> ALL_FACETS
    • document

      protected D document
    • exportConfiguration

      protected ExportConfiguration exportConfiguration
    • cellJoinComponents

      protected final boolean cellJoinComponents
  • Constructor Details

    • TableExporter

      protected TableExporter(O defaultOptions)
    • TableExporter

      protected TableExporter(O defaultOptions, Set<TableExporter.FacetType> supportedFacetTypes, boolean cellJoinComponents)
  • Method Details

    • export

      public void export(javax.faces.context.FacesContext context, List<T> tables, ExportConfiguration exportConfiguration) throws IOException
      Specified by:
      export in interface Exporter<T extends javax.faces.component.UIComponent & UITable>
      Throws:
      IOException
    • exportTable

      protected void exportTable(javax.faces.context.FacesContext context, T table, int index) throws IOException
      Throws:
      IOException
    • addTableFacets

      protected void addTableFacets(javax.faces.context.FacesContext context, T table, TableExporter.ColumnType columnType)
    • addColumnFacets

      protected void addColumnFacets(javax.faces.context.FacesContext context, T table, TableExporter.ColumnType columnType) throws IOException
      Throws:
      IOException
    • addColumnGroupFacets

      protected boolean addColumnGroupFacets(javax.faces.context.FacesContext context, T table, TableExporter.ColumnType columnType)
    • addCells

      protected void addCells(javax.faces.context.FacesContext context, T table)
    • exportTabletFacetValue

      protected void exportTabletFacetValue(javax.faces.context.FacesContext context, T table, String textValue)
    • exportColumnFacetValue

      protected void exportColumnFacetValue(javax.faces.context.FacesContext context, T table, ColumnValue columnValue, int index)
    • exportColumnGroupFacetValue

      protected void exportColumnGroupFacetValue(javax.faces.context.FacesContext context, T table, UIColumn column, AtomicInteger colIndex, ColumnValue columnValue)
    • exportCellValue

      protected abstract void exportCellValue(javax.faces.context.FacesContext context, T table, UIColumn col, ColumnValue columnValue, int index)
    • exportPageOnly

      protected abstract void exportPageOnly(javax.faces.context.FacesContext context, T table)
    • exportAll

      protected abstract void exportAll(javax.faces.context.FacesContext context, T table)
    • exportSelectionOnly

      protected abstract void exportSelectionOnly(javax.faces.context.FacesContext context, T table)
    • preExport

      protected void preExport(javax.faces.context.FacesContext context) throws IOException
      Throws:
      IOException
    • postExport

      protected void postExport(javax.faces.context.FacesContext context) throws IOException
      Throws:
      IOException
    • preRowExport

      protected void preRowExport(javax.faces.context.FacesContext context, T table)
    • postRowExport

      protected void postRowExport(javax.faces.context.FacesContext context, T table)
    • createDocument

      protected abstract D createDocument(javax.faces.context.FacesContext context) throws IOException
      Throws:
      IOException
    • getExportableColumns

      protected List<UIColumn> getExportableColumns(T table)
      Gets and caches the list of UIColumns that are exportable="true", visible="true", and rendered="true". Orders them by displayPriority so they match the UI display of the columns.
      Parameters:
      table - the Table with columns to export
      Returns:
      the List that are exportable
    • options

      protected O options()
    • os

      protected OutputStream os()
    • getOnTableRenderArgs

      protected Object[] getOnTableRenderArgs()
    • getComponentValue

      public String getComponentValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
    • getColumnValue

      public ColumnValue getColumnValue(javax.faces.context.FacesContext context, UITable table, UIColumn column, boolean joinComponents)
    • getComponentFacetValue

      public String getComponentFacetValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent, String facetname)
    • getColumnFacetValue

      public ColumnValue getColumnFacetValue(javax.faces.context.FacesContext context, UIColumn column, TableExporter.ColumnType columnType)
    • getColumnExportTag

      public String getColumnExportTag(javax.faces.context.FacesContext context, UIColumn column)