Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 11g Release 1 (11.1.1.7.1) E12419-10 |
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".
<source> <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> </source>
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.
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) and 'selected'. Can only be set to 'selected' if the underlying collection supports the operation. For tables with 'detailStamp' disclosure, exported data always includes 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. |