dandelion / dandelion-datatables

Dandelion component for DataTables
http://dandelion.github.io/components/datatables/
Other
110 stars 49 forks source link

Add support to export via AJAX when there are multiple tables #223

Closed tduchateau closed 10 years ago

tduchateau commented 10 years ago

Issue by dcervera from Monday Nov 11, 2013 at 15:33 GMT


Currently, table export via AJAX only works right when there is only one table in the page. If there is more than one table, all the export buttons export the same table, specifically, the last one.

That's because all the JS function that initiates the export process (function executed when you click on the export button) are named with the same name for all the tables in the page. That is, p.e. for PDF export function:

ddl_dt_launch_export_pdf

To support export via AJAX for multiple tables it's necessary a way to name each export function differently for each type (CSV​​, PDF, etc.) and for each table.

That's can be solved simply adding the ID of the table to the name of the export function when its name is generated in ExportManager.java, for both HTTP methods, that is:

RavBhagdev commented 7 years ago

I am not using AJAX method but thymeleaf and have the same problem. Links to source above don't seem to work anymore.

Any idea how I can configure or update this to get export to work for multiple tables?