DataExport on TreeTable

UI Components for JSF
Post Reply
Chet
Posts: 12
Joined: 05 Jun 2011, 02:31

05 Jun 2011, 02:41

Hi,

I noticed that the ExcelExport doesn't want to export TreeTables, only DataTables. It throws the following error (on 3.0.M2-SNAPSHOT):

Unsupported datasource target:"org.primefaces.component.treetable.TreeTable", exporter must target a PrimeFaces DataTable.

I checked the ExcelExporter code, and it seemed to me that it should be quite possible to export TreeTables as well, since the exporter only needs UIData methods like getFirst(), setRowIndex(). But the DataExporter checks strictly via "instanceof DataTable". So, if you refactor the code to use UIData instead of DataTable, I think it would be possible to export both, TreeTable and DataTable. That'd be cool!

Cheers,
Chet.
PrimeFaces version: 3.1 - JSF implementation: Mojarra 2.1.3 - Server: JBoss AS 7.0.2


Chet
Posts: 12
Joined: 05 Jun 2011, 02:31

05 Jun 2011, 23:35

Ok, done, thanks for the hint!
PrimeFaces version: 3.1 - JSF implementation: Mojarra 2.1.3 - Server: JBoss AS 7.0.2

bresella
Posts: 5
Joined: 28 Jul 2014, 17:41

11 Oct 2019, 13:55

I have found this interesting project takes a look.

https://github.com/rdicroce/jsfexporter

May help you

Post Reply

Return to “PrimeFaces”

  • Information