Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
12c (12.2.1.4.0)
E81455-02
<af:exportCollectionActionListener>
exportCollectionActionListener exportcollectionactionlistenerexportcollectionaction
The exportCollectionActionListener tag is a declarative way to allow an
action source (<commandButton>, <commandLink>,
etc.) to export data from a collection component (table, tree or treeTable)
into an external format. Since export must be processed with an ordinary request - not
XMLHttp AJAX requests - this tag forces partialSubmit to be
false on the parent component, if it supports that attribute.
This example exports a collection with the id "table".
<af:table id="table" ...>
...
</af:table>
<af:commandButton text="Export To Excel" immediate="true">
<af:exportCollectionActionListener type="excelHTML" exportedId="table"
filename="export.xls" title="ADF Faces Export"/>
</af:commandButton>
A limitation of the exportCollectionActionListener tag exists in Internet Explorer if
the filename is multibyte, like Japanese characters. If the filename is multibyte and
does not contain an ascii extension (e.g., .txt or .doc), then the filename
will not display correctly in the file download box.
Attributes
Name
Type
Supports EL?
Description
exportedId
String
Yes
ID of the component to be exported. IDs without a leading separator
character are treated as relative to the command component that will
be invoking this action.
filename
String
Yes
the proposed filename for the exported content. When set, a "Save File"
dialog will typically be displayed, though this is ultimately up to
the browser. If not set, the content will typically be displayed inline
in the browser if possible.
title
String
Yes
the title of the exported document. Whether the title is displayed and
how exactly it is displayed depends on the export format and the opening
application.
type
String
Yes
export type. Currently supported values are 'excelHTML' and 'CSV'.
exportedRows
String
Yes
the rows to include in the export. Allowable values are
'all' (the default) - exports all rows in the data collection
'selected' - exports only those rows the user has selected
'disclosed' - exports those rows currently disclosed in the page
'allWithoutDetails'
'selectedWithoutDetails'
'disclosedWithoutDetails'
Can only be set to 'selected|selectedWithoutDetails' if the underlying collection supports selection.
For tables with 'detailStamp' disclosure, use 'allWithoutDetails', 'selectedWithoutDetails' and
'disclosedWithoutDetails' to suppress exporting disclosure area.
charset
String
Yes
charset used in the exported file. If not speficied, UTF-8 will be used.
rowLimit
int
Yes
Maximum number of rows to be exported. Default is -1, which means no limit is imposed.
filterMethod
MethodExpression
Only EL
Filter method to be invoked before exportCollectionActionListener processes any component for export. This
provides a way for application developer to override the default export behavior for any component. When both
filterMethod and filterName is specified, filterMethod takes precedence.
filterName
String
Yes
Name of the filter method to be used by exportCollectionActionListener when it processes any component for export.
The supported filter name is skipObjectComponent, which will skip any Object component from being exported.