Package org.primefaces.component.export
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>
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static enum
protected static enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Set<TableExporter.FacetType>
protected final boolean
protected D
protected ExportConfiguration
-
Constructor Summary
ModifierConstructorDescriptionprotected
TableExporter
(O defaultOptions) protected
TableExporter
(O defaultOptions, Set<TableExporter.FacetType> supportedFacetTypes, boolean cellJoinComponents) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
addColumnFacets
(javax.faces.context.FacesContext context, T table, TableExporter.ColumnType columnType) protected boolean
addColumnGroupFacets
(javax.faces.context.FacesContext context, T table, TableExporter.ColumnType columnType) protected void
addTableFacets
(javax.faces.context.FacesContext context, T table, TableExporter.ColumnType columnType) protected abstract D
createDocument
(javax.faces.context.FacesContext context) void
export
(javax.faces.context.FacesContext context, List<T> tables, ExportConfiguration exportConfiguration) protected abstract void
protected abstract void
exportCellValue
(javax.faces.context.FacesContext context, T table, UIColumn col, ColumnValue columnValue, int index) protected void
exportColumnFacetValue
(javax.faces.context.FacesContext context, T table, ColumnValue columnValue, int index) protected void
exportColumnGroupFacetValue
(javax.faces.context.FacesContext context, T table, UIColumn column, AtomicInteger colIndex, ColumnValue columnValue) protected abstract void
exportPageOnly
(javax.faces.context.FacesContext context, T table) protected abstract void
exportSelectionOnly
(javax.faces.context.FacesContext context, T table) protected void
exportTable
(javax.faces.context.FacesContext context, T table, int index) protected void
exportTabletFacetValue
(javax.faces.context.FacesContext context, T table, String textValue) getColumnExportTag
(javax.faces.context.FacesContext context, UIColumn column) getColumnFacetValue
(javax.faces.context.FacesContext context, UIColumn column, TableExporter.ColumnType columnType) getColumnValue
(javax.faces.context.FacesContext context, UITable table, UIColumn column, boolean joinComponents) getComponentFacetValue
(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent, String facetname) getComponentValue
(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) getExportableColumns
(T table) Gets and caches the list of UIColumns that are exportable="true", visible="true", and rendered="true".protected Object[]
protected O
options()
protected OutputStream
os()
protected void
postExport
(javax.faces.context.FacesContext context) protected void
postRowExport
(javax.faces.context.FacesContext context, T table) protected void
preExport
(javax.faces.context.FacesContext context) protected void
preRowExport
(javax.faces.context.FacesContext context, T table) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.primefaces.component.export.Exporter
getContentType, getFileExtension
-
Field Details
-
ALL_FACETS
-
document
-
exportConfiguration
-
cellJoinComponents
protected final boolean cellJoinComponents
-
-
Constructor Details
-
TableExporter
-
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 interfaceExporter<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
-
exportTabletFacetValue
-
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
-
exportAll
-
exportSelectionOnly
-
preExport
- Throws:
IOException
-
postExport
- Throws:
IOException
-
preRowExport
-
postRowExport
-
createDocument
- Throws:
IOException
-
getExportableColumns
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
-
os
-
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
-
getColumnFacetValue
public ColumnValue getColumnFacetValue(javax.faces.context.FacesContext context, UIColumn column, TableExporter.ColumnType columnType) -
getColumnExportTag
-