Class DataTableExporter
- java.lang.Object
-
- org.primefaces.component.datatable.export.DataTableExporter
-
- Direct Known Subclasses:
DataTableCSVExporter,DataTableExcelExporter,DataTablePDFExporter,DataTableXMLExporter
public abstract class DataTableExporter extends Object implements Exporter<DataTable>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDataTableExporter.ColumnType
-
Constructor Summary
Constructors Constructor Description DataTableExporter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoExport(javax.faces.context.FacesContext facesContext, DataTable table, ExportConfiguration exportConfiguration, int index)Export datatablevoidexport(javax.faces.context.FacesContext context, List<DataTable> tables, OutputStream outputStream, ExportConfiguration exportConfiguration)protected voidexportAll(javax.faces.context.FacesContext context, DataTable table, Object document)protected abstract voidexportCells(DataTable table, Object document)protected StringexportColumnByFunction(javax.faces.context.FacesContext context, UIColumn column)protected voidexportPageOnly(javax.faces.context.FacesContext context, DataTable table, Object document)protected voidexportRow(DataTable table, Object document)protected voidexportRow(DataTable table, Object document, int rowIndex)protected voidexportSelectionOnly(javax.faces.context.FacesContext context, DataTable table, Object document)StringexportValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)protected List<javax.faces.component.UIColumn>getColumnsToExport(javax.faces.component.UIData table)protected OutputStreamgetOutputStream()protected booleanhasColumnFooter(List<javax.faces.component.UIColumn> columns)protected voidpostExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)protected voidpostRowExport(DataTable table, Object document)protected voidpreExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)protected voidpreRowExport(DataTable table, Object document)-
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
-
-
-
-
Method Detail
-
getColumnsToExport
protected List<javax.faces.component.UIColumn> getColumnsToExport(javax.faces.component.UIData table)
-
hasColumnFooter
protected boolean hasColumnFooter(List<javax.faces.component.UIColumn> columns)
-
exportColumnByFunction
protected String exportColumnByFunction(javax.faces.context.FacesContext context, UIColumn column)
-
exportValue
public String exportValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
-
exportPageOnly
protected void exportPageOnly(javax.faces.context.FacesContext context, DataTable table, Object document)
-
exportAll
protected void exportAll(javax.faces.context.FacesContext context, DataTable table, Object document)
-
exportSelectionOnly
protected void exportSelectionOnly(javax.faces.context.FacesContext context, DataTable table, Object document)
-
preExport
protected void preExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration) throws IOException- Throws:
IOException
-
postExport
protected void postExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration) throws IOException- Throws:
IOException
-
export
public void export(javax.faces.context.FacesContext context, List<DataTable> tables, OutputStream outputStream, ExportConfiguration exportConfiguration) throws IOException- Specified by:
exportin interfaceExporter<DataTable>- Throws:
IOException
-
doExport
protected abstract void doExport(javax.faces.context.FacesContext facesContext, DataTable table, ExportConfiguration exportConfiguration, int index) throws IOExceptionExport datatable- Parameters:
facesContext- faces contexttable- datatable to exportexportConfiguration- export configurationindex- datatable current index during export process- Throws:
IOException
-
getOutputStream
protected OutputStream getOutputStream()
-
-