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 class
DataTableExporter.ColumnType
-
Constructor Summary
Constructors Constructor Description DataTableExporter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doExport(javax.faces.context.FacesContext facesContext, DataTable table, ExportConfiguration exportConfiguration, int index)
Export datatablevoid
export(javax.faces.context.FacesContext context, List<DataTable> tables, OutputStream outputStream, ExportConfiguration exportConfiguration)
protected void
exportAll(javax.faces.context.FacesContext context, DataTable table, Object document)
protected abstract void
exportCells(DataTable table, Object document)
protected String
exportColumnByFunction(javax.faces.context.FacesContext context, UIColumn column)
protected void
exportPageOnly(javax.faces.context.FacesContext context, DataTable table, Object document)
protected void
exportRow(DataTable table, Object document)
protected void
exportRow(DataTable table, Object document, int rowIndex)
protected void
exportSelectionOnly(javax.faces.context.FacesContext context, DataTable table, Object document)
String
exportValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
protected List<javax.faces.component.UIColumn>
getColumnsToExport(javax.faces.component.UIData table)
protected OutputStream
getOutputStream()
protected boolean
hasColumnFooter(List<javax.faces.component.UIColumn> columns)
protected void
postExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)
protected void
postRowExport(DataTable table, Object document)
protected void
preExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)
protected void
preRowExport(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:
export
in interfaceExporter<DataTable>
- Throws:
IOException
-
doExport
protected abstract void doExport(javax.faces.context.FacesContext facesContext, DataTable table, ExportConfiguration exportConfiguration, int index) throws IOException
Export datatable- Parameters:
facesContext
- faces contexttable
- datatable to exportexportConfiguration
- export configurationindex
- datatable current index during export process- Throws:
IOException
-
getOutputStream
protected OutputStream getOutputStream()
-
-