ICEfaces ACE Components 3.3.0
Java API Documentation

org.icefaces.ace.component.dataexporter
Class DataExporterBase

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.icefaces.ace.component.dataexporter.DataExporterBase
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, IceClientBehaviorHolder, IDataExporter
Direct Known Subclasses:
DataExporter

public class DataExporterBase
extends javax.faces.component.UIComponentBase
implements IDataExporter, IceClientBehaviorHolder

Utility to export data from a datatable as an Excel, PDF, XML or CSV document. This component renders an HTML button. More components and HTML elements can be nested inside this tag to give a different look to the button.

For more information, see the DataExporter Wiki Documentation.


Nested Class Summary
protected static class DataExporterBase.PropertyKeys
           
 
Field Summary
static java.lang.String COMPONENT_TYPE
           
static java.lang.String RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
 
Constructor Summary
DataExporterBase()
           
 
Method Summary
 void addClientBehavior(java.lang.String eventName, javax.faces.component.behavior.ClientBehavior behavior)
           
 java.lang.Object getCustomExporter()
          Return the value of the customExporter property.
 java.lang.String getDefaultEventName()
           
 java.lang.String getDefaultExecute(java.lang.String event)
           
 java.lang.String getDefaultRender(java.lang.String event)
           
 java.lang.String getEncoding()
          Return the value of the encoding property.
 java.util.Collection<java.lang.String> getEventNames()
           
 java.lang.String getExcludeColumns()
          Return the value of the excludeColumns property.
 java.lang.String getFamily()
           
 java.lang.String getFileName()
          Return the value of the fileName property.
 java.lang.String getLabel()
          Return the value of the label property.
 javax.el.MethodExpression getPostProcessor()
          Return the value of the postProcessor property.
 javax.el.MethodExpression getPreProcessor()
          Return the value of the preProcessor property.
 java.lang.String getStyle()
          Return the value of the style property.
 java.lang.String getStyleClass()
          Return the value of the styleClass property.
 java.lang.String getTarget()
          Return the value of the target property.
 java.lang.String getType()
          Return the value of the type property.
 boolean isExpandedOnly()
          Return the value of the expandedOnly property.
 boolean isIncludeFooters()
          Return the value of the includeFooters property.
 boolean isIncludeHeaders()
          Return the value of the includeHeaders property.
 boolean isPageOnly()
          Return the value of the pageOnly property.
 boolean isSelectedRowsOnly()
          Return the value of the selectedRowsOnly property.
 boolean isUserColumnOrder()
          Return the value of the userColumnOrder property.
 void setCustomExporter(java.lang.Object customExporter)
          Set the value of the customExporter property.
 void setEncoding(java.lang.String encoding)
          Set the value of the encoding property.
 void setExcludeColumns(java.lang.String excludeColumns)
          Set the value of the excludeColumns property.
 void setExpandedOnly(boolean expandedOnly)
          Set the value of the expandedOnly property.
 void setFileName(java.lang.String fileName)
          Set the value of the fileName property.
 void setIncludeFooters(boolean includeFooters)
          Set the value of the includeFooters property.
 void setIncludeHeaders(boolean includeHeaders)
          Set the value of the includeHeaders property.
 void setLabel(java.lang.String label)
          Set the value of the label property.
 void setPageOnly(boolean pageOnly)
          Set the value of the pageOnly property.
 void setPostProcessor(javax.el.MethodExpression postProcessor)
          Set the value of the postProcessor property.
 void setPreProcessor(javax.el.MethodExpression preProcessor)
          Set the value of the preProcessor property.
 void setSelectedRowsOnly(boolean selectedRowsOnly)
          Set the value of the selectedRowsOnly property.
 void setStyle(java.lang.String style)
          Set the value of the style property.
 void setStyleClass(java.lang.String styleClass)
          Set the value of the styleClass property.
 void setTarget(java.lang.String target)
          Set the value of the target property.
 void setType(java.lang.String type)
          Set the value of the type property.
 void setUserColumnOrder(boolean userColumnOrder)
          Set the value of the userColumnOrder property.
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
getClientBehaviors
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

RENDERER_TYPE

public static final java.lang.String RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

DataExporterBase

public DataExporterBase()
Method Detail

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

setCustomExporter

public void setCustomExporter(java.lang.Object customExporter)

Set the value of the customExporter property.

Contents: Specifies an object that implements a custom format type to use instead of one of the built-in formats. When this attribute is specified, it will override the "type" attribute. The object must extend org.icefaces.ace.component.dataexporter.Exporter.

Specified by:
setCustomExporter in interface IDataExporter

getCustomExporter

public java.lang.Object getCustomExporter()

Return the value of the customExporter property.

Contents: Specifies an object that implements a custom format type to use instead of one of the built-in formats. When this attribute is specified, it will override the "type" attribute. The object must extend org.icefaces.ace.component.dataexporter.Exporter.

Specified by:
getCustomExporter in interface IDataExporter

setEncoding

public void setEncoding(java.lang.String encoding)

Set the value of the encoding property.

Contents: Define a character encoding to use.

Specified by:
setEncoding in interface IDataExporter

getEncoding

public java.lang.String getEncoding()

Return the value of the encoding property.

Contents: Define a character encoding to use. Default = 'UTF-8'.

Specified by:
getEncoding in interface IDataExporter

setExcludeColumns

public void setExcludeColumns(java.lang.String excludeColumns)

Set the value of the excludeColumns property.

Contents: Define a comma separated list of column indexes (zero-relative) to be excluded from export.

Specified by:
setExcludeColumns in interface IDataExporter

getExcludeColumns

public java.lang.String getExcludeColumns()

Return the value of the excludeColumns property.

Contents: Define a comma separated list of column indexes (zero-relative) to be excluded from export.

Specified by:
getExcludeColumns in interface IDataExporter

setExpandedOnly

public void setExpandedOnly(boolean expandedOnly)

Set the value of the expandedOnly property.

Contents: When using row expansion in the table, specify whether the child rows should be exported only if the parent row has been expanded by the user.

Specified by:
setExpandedOnly in interface IDataExporter

isExpandedOnly

public boolean isExpandedOnly()

Return the value of the expandedOnly property.

Contents: When using row expansion in the table, specify whether the child rows should be exported only if the parent row has been expanded by the user. Default = 'false'.

Specified by:
isExpandedOnly in interface IDataExporter

setFileName

public void setFileName(java.lang.String fileName)

Set the value of the fileName property.

Contents: Define the filename of the generated file, defaults to dataTable id.

Specified by:
setFileName in interface IDataExporter

getFileName

public java.lang.String getFileName()

Return the value of the fileName property.

Contents: Define the filename of the generated file, defaults to dataTable id.

Specified by:
getFileName in interface IDataExporter

setIncludeFooters

public void setIncludeFooters(boolean includeFooters)

Set the value of the includeFooters property.

Contents: Disable whether column footers should be included at the bottom of the file. This is not applicable when attribute 'type' is set to 'xml'.

Specified by:
setIncludeFooters in interface IDataExporter

isIncludeFooters

public boolean isIncludeFooters()

Return the value of the includeFooters property.

Contents: Disable whether column footers should be included at the bottom of the file. This is not applicable when attribute 'type' is set to 'xml'. Default = 'true'.

Specified by:
isIncludeFooters in interface IDataExporter

setIncludeHeaders

public void setIncludeHeaders(boolean includeHeaders)

Set the value of the includeHeaders property.

Contents: Disable whether column headers should be included at the top of the file. This is not applicable when attribute 'type' is set to 'xml'.

Specified by:
setIncludeHeaders in interface IDataExporter

isIncludeHeaders

public boolean isIncludeHeaders()

Return the value of the includeHeaders property.

Contents: Disable whether column headers should be included at the top of the file. This is not applicable when attribute 'type' is set to 'xml'. Default = 'true'.

Specified by:
isIncludeHeaders in interface IDataExporter

setLabel

public void setLabel(java.lang.String label)

Set the value of the label property.

Contents: Define the text that will appear on the button to trigger the export. Default value is 'Export'. Attribute applies only if the component has no children.

Specified by:
setLabel in interface IDataExporter

getLabel

public java.lang.String getLabel()

Return the value of the label property.

Contents: Define the text that will appear on the button to trigger the export. Default value is 'Export'. Attribute applies only if the component has no children.

Specified by:
getLabel in interface IDataExporter

setPageOnly

public void setPageOnly(boolean pageOnly)

Set the value of the pageOnly property.

Contents: Enable to export only the current page instead of the whole data set.

Specified by:
setPageOnly in interface IDataExporter

isPageOnly

public boolean isPageOnly()

Return the value of the pageOnly property.

Contents: Enable to export only the current page instead of the whole data set. Default = 'false'.

Specified by:
isPageOnly in interface IDataExporter

setPostProcessor

public void setPostProcessor(javax.el.MethodExpression postProcessor)

Set the value of the postProcessor property.

Contents: Defines a public void method to invoke after the PDF or XLS document has been generated, allowing developers to manipulate the document. It must take a single argument of type Object. The object will be of type com.lowagie.text.Document (iText library) for PDF documents and of type org.apache.poi.ss.usermodel.Workbook (Apache POI library) for XLS documents.

Specified by:
setPostProcessor in interface IDataExporter

getPostProcessor

public javax.el.MethodExpression getPostProcessor()

Return the value of the postProcessor property.

Contents: Defines a public void method to invoke after the PDF or XLS document has been generated, allowing developers to manipulate the document. It must take a single argument of type Object. The object will be of type com.lowagie.text.Document (iText library) for PDF documents and of type org.apache.poi.ss.usermodel.Workbook (Apache POI library) for XLS documents.

Specified by:
getPostProcessor in interface IDataExporter

setPreProcessor

public void setPreProcessor(javax.el.MethodExpression preProcessor)

Set the value of the preProcessor property.

Contents: Defines a public void method to invoke before the PDF or XLS document is generated, allowing developers to manipulate the document. It must take a single argument of type Object. The object will be of type com.lowagie.text.Document (iText library) for PDF documents and of type org.apache.poi.ss.usermodel.Workbook (Apache POI library) for XLS documents.

Specified by:
setPreProcessor in interface IDataExporter

getPreProcessor

public javax.el.MethodExpression getPreProcessor()

Return the value of the preProcessor property.

Contents: Defines a public void method to invoke before the PDF or XLS document is generated, allowing developers to manipulate the document. It must take a single argument of type Object. The object will be of type com.lowagie.text.Document (iText library) for PDF documents and of type org.apache.poi.ss.usermodel.Workbook (Apache POI library) for XLS documents.

Specified by:
getPreProcessor in interface IDataExporter

setSelectedRowsOnly

public void setSelectedRowsOnly(boolean selectedRowsOnly)

Set the value of the selectedRowsOnly property.

Contents: Enable to export only the currently selected rows instead of the whole dataset.

Specified by:
setSelectedRowsOnly in interface IDataExporter

isSelectedRowsOnly

public boolean isSelectedRowsOnly()

Return the value of the selectedRowsOnly property.

Contents: Enable to export only the currently selected rows instead of the whole dataset. Default = 'false'.

Specified by:
isSelectedRowsOnly in interface IDataExporter

setStyle

public void setStyle(java.lang.String style)

Set the value of the style property.

Contents: Custom inline CSS styles to use for this component. These styles are generally applied to the root DOM element of the component. This is intended for per-component basic style customizations. Note that due to browser CSS precedence rules, CSS rendered on a DOM element will take precedence over the external stylesheets used to provide the ThemeRoller theme on this component. If the CSS properties applied with this attribute do not affect the DOM element you want to style, you may need to create a custom theme styleClass for the theme CSS class that targets the particular DOM elements you wish to customize.

Specified by:
setStyle in interface IDataExporter

getStyle

public java.lang.String getStyle()

Return the value of the style property.

Contents: Custom inline CSS styles to use for this component. These styles are generally applied to the root DOM element of the component. This is intended for per-component basic style customizations. Note that due to browser CSS precedence rules, CSS rendered on a DOM element will take precedence over the external stylesheets used to provide the ThemeRoller theme on this component. If the CSS properties applied with this attribute do not affect the DOM element you want to style, you may need to create a custom theme styleClass for the theme CSS class that targets the particular DOM elements you wish to customize.

Specified by:
getStyle in interface IDataExporter

setStyleClass

public void setStyleClass(java.lang.String styleClass)

Set the value of the styleClass property.

Contents: Custom CSS style class(es) to use for this component. These style classes can be defined in your page or in a theme CSS file.

Specified by:
setStyleClass in interface IDataExporter

getStyleClass

public java.lang.String getStyleClass()

Return the value of the styleClass property.

Contents: Custom CSS style class(es) to use for this component. These style classes can be defined in your page or in a theme CSS file.

Specified by:
getStyleClass in interface IDataExporter

setTarget

public void setTarget(java.lang.String target)

Set the value of the target property.

Contents: Define the id of the ace:dataTable whose data will be exported.

Specified by:
setTarget in interface IDataExporter

getTarget

public java.lang.String getTarget()

Return the value of the target property.

Contents: Define the id of the ace:dataTable whose data will be exported.

Specified by:
getTarget in interface IDataExporter

setType

public void setType(java.lang.String type)

Set the value of the type property.

Contents: Define the format of file export. Available formats: "xls","pdf","csv", "xml".

Specified by:
setType in interface IDataExporter

getType

public java.lang.String getType()

Return the value of the type property.

Contents: Define the format of file export. Available formats: "xls","pdf","csv", "xml".

Specified by:
getType in interface IDataExporter

setUserColumnOrder

public void setUserColumnOrder(boolean userColumnOrder)

Set the value of the userColumnOrder property.

Contents: Specify whether the columns should be exported according to the order established by the user in the client. When false, the column order defined in the markup will be used.

Specified by:
setUserColumnOrder in interface IDataExporter

isUserColumnOrder

public boolean isUserColumnOrder()

Return the value of the userColumnOrder property.

Contents: Specify whether the columns should be exported according to the order established by the user in the client. When false, the column order defined in the markup will be used. Default = 'true'.

Specified by:
isUserColumnOrder in interface IDataExporter

getEventNames

public java.util.Collection<java.lang.String> getEventNames()
Specified by:
getEventNames in interface javax.faces.component.behavior.ClientBehaviorHolder
Overrides:
getEventNames in class javax.faces.component.UIComponentBase

getDefaultEventName

public java.lang.String getDefaultEventName()
Specified by:
getDefaultEventName in interface javax.faces.component.behavior.ClientBehaviorHolder
Overrides:
getDefaultEventName in class javax.faces.component.UIComponentBase

getDefaultRender

public java.lang.String getDefaultRender(java.lang.String event)
Specified by:
getDefaultRender in interface IceClientBehaviorHolder

getDefaultExecute

public java.lang.String getDefaultExecute(java.lang.String event)
Specified by:
getDefaultExecute in interface IceClientBehaviorHolder

addClientBehavior

public void addClientBehavior(java.lang.String eventName,
                              javax.faces.component.behavior.ClientBehavior behavior)
Specified by:
addClientBehavior in interface javax.faces.component.behavior.ClientBehaviorHolder
Overrides:
addClientBehavior in class javax.faces.component.UIComponentBase

ICEfaces ACE Components 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.