dandelion / dandelion-datatables

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

th:block breaks filter based export #274

Open sundermann opened 9 years ago

sundermann commented 9 years ago

A th:block element inside the table will break filter based exports. For example:

<table dt:export="true"><thead>...</thead><tbody>
<th:block th:each="foo : bar">
<tr>....</tr>
<tr>....</tr>
</th:block>
</tbody>
</table>

will not render any rows in the resulting export. This seems to be an issue with TbodyElProcessor since it does check for <tr> elements in <tbody> only. In case of th:block the th:block itself should be skipped. In general it would be an improvement if the export classes can also use child tags from <td> so that one could write it's own export which parses some more tags inside of <td> and displays the content more beautifully.

tduchateau commented 9 years ago

Thanks for reporting this one.

In general it would be an improvement if the export classes can also use child tags from <td> so that one could write it's own export which parses some more tags inside of <td> and displays the content more beautifully.

Could you please post a use-case?

Thanks!

sundermann commented 9 years ago

For example the PDF Export could render <p> tags as block elements. Another idea is to render the bullets when exporting a HTML list. Right now the only way to do some kind of structuring content is to use custom rendering by adding \n or \t into the exported cell.