ICEfaces Component Suite
Tag dataExporter


The ice:dataExporter component can be used to export the data contents of an ice:dataTable component into a variety of formats.
There are following two formats supported by the component:

The outputTypeHandler attribute allows developer to define custom output formats.
The label, image and renderLabelAsButton are interrelated. Their order of precedence are as follows:



Tag Information
Tag Classcom.icesoft.faces.component.dataexporter.DataExporterTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
bindingfalsefalsejava.lang.String The value binding expression linking this component to a property in a backing bean
clickToCreateFileTextfalsefalsejava.lang.String Note: This is deprecated as of 1.8.1. Specifying a value for this attribute will have no effect.
forfalsefalsejava.lang.String ID of the dataTable that this dataExporter component will export data from.
idfalsefalsejava.lang.String The component identifier for this component. This value must be unique within the closest parent component that is a naming container.
ignorePaginationfalsefalsejava.lang.String This is false by default. If true the dataExporter will ignore the "first" and "rows" properties on the associated dataTable.
imagefalsefalsejava.lang.String The URL of an image that will be rendered instead of the 'label' attribute text which the user can click on to initiate a data export download. When this attribute is specified, the 'label' text will be used for the 'title' and 'alt' text on the image element.
includeColumnsfalsefalsejava.lang.String

This attribute lets you define the order and number of columns that needs to be added to the generated output. It takes comma separated column indexes. Note that index starts with 0.

If there are 6 columns in the table and you want to add only 1st, 4th and 6th column to the generated output:
<ice:dataExporter includeColumns="0,3,5"... >
The column order of the above example can be changed a well:
<ice:dataExporter includeColumns="5,0,3"... >
By default all columns will be included to the output, and in the default order.

labelfalsefalsejava.lang.String The value of this attribute will be rendered to download the generated file. If it has not been defined then the file name will be rendered instead.
outputTypeHandlerfalsefalsejava.lang.String Custom output handler can be define using this attribute. The custom handler must be a type of com.icesoft.faces.component.dataexporter.OutputTypeHandler
popupBlockerLabelfalsefalsejava.lang.String

When used in a browser with a popup blocker enabled downloading the exported file will require two clicks instead of a single click. In this case the value of this attribute will be used to update the label for the dataExporter to reflect that the user must click the link/button/image again to complete the download process..

renderLabelAsButtonfalsefalsejava.lang.String This is false by default. If true the label text will be the label of a rendered button, instead of an anchor link.
renderedfalsefalsejava.lang.String Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
stylefalsefalsejava.lang.String CSS style(s) to be applied when this component is rendered.
styleClassfalsefalsejava.lang.String

Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.
Default value is iceDatExp

typefalsefalsejava.lang.String

It can have one of the following value:

  • excel
  • csv
Note: If the custom handler has been defined using the outputTypeHandler attribute then it will take percedence over this attribute.


Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.