Differences between revisions 10 and 11
Revision 10 as of 2008-11-05 00:28:48
Size: 1161
Editor: HazemSaleh
Comment:
Revision 11 as of 2009-09-20 23:01:49
Size: 1161
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
[[BR]] <<BR>>
Line 22: Line 22:
[[BR]] <<BR>>

exporterActionListener allows exporting HtmlDataTable contents as an excel or a pdf file. It is an action listener that can be attached to any action source component like commandButton. Here is an example of usage :

<h:commandButton value="export">

    <s:exporterActionListener filename="myFile" 
                              fileType="<XLS or PDF>" 
                              for="<your dataTable ID>">;

</h:commandButton>


Here are the exporterActionListener attributes :

* fileType: An attribute to specify whether to export an excel or a pdf file, possible values are {'XLS', 'PDF'}.

* for: An id of the dataTable to be exported.

* filename: An optional attribute to specify the filename of the exported excel or pdf file.


The underlying excel exporting engine used is (Apache POI) while the pdf one is (iText). Attribute (for) is the id of the datatable whose value to be exported, (fileType) is an attribute to specify whether to export an excel or a pdf file , possible values are {'XLS', 'PDF'} , and (filename) is an optional attribute to specify the filename of the exported excel or pdf file.

ExporterActionListener (last edited 2009-09-20 23:01:49 by localhost)