Reputation: 2130
I'm looking at some java code which exports csv & Excel from a PrimeFaces datatable. I've actually not quite got it up and running yet so can't debug, just was having a quick looksee. Oddly it's relatively clear what is going on for Excel & PDF (excel-type-excel-.jar & excel-type-pdf-.jar) but I can't find any reference to the presumably default code which exports the plain old csv file. It doesn't seem to be in jsf-exporter-core or the export-source-primefaces*.jar which seem to expect a IExportType object - IExportType exporter
@Override
public void exportData(DataTable source, DataTableExportOptions configOptions, IExportType<?, ?, ?> exporter, FacesContext context) throws Exception {
This is a bit of a outside shot but I just wondered if anyone could tell me where I should look for the code doing (presumably the default) csv type export ?
Upvotes: 2
Views: 603
Reputation: 12019
The code is right here in GitHub as contains all the classes that do the exporting.
https://github.com/primefaces/primefaces/tree/master/src/main/java/org/primefaces/component/export
However since you mentioned "excel-type-excel-.jar & excel-type-pdf-.jar" are you sure the code you are looking at isn't using a custom exporter and not the PF built in exporter? To me is sounds like it might be a mix because I have never heard of either one of those JAR files.
Upvotes: 1