Skip to content

Commit c6dc974

Browse files
committed
refactor(tml-export): various fixes + switch to 1.0.0
* Fixed wrong URLs * Improved comments
1 parent 054b8ae commit c6dc974

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

datatables-thymeleaf-export/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You can then access the sample here: [http://localhost:9090/datatables-thymeleaf
3838

3939
## Bug/improvement
4040

41-
Please report it using the issue tracker dedicated to all sample apps: [https://waffle.io/dandelion/dandelion-samples](https://waffle.io/dandelion/dandelion-samples)
41+
Please report it using the issue tracker dedicated to all sample apps: [https://github.com/dandelion/dandelion-datatables-samples/issues](https://github.com/dandelion/dandelion-datatables-samples/issues)
4242

4343
=
4444
The [Dandelion team](http://dandelion.github.io/team/).

datatables-thymeleaf-export/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.github.dandelion</groupId>
66
<artifactId>datatables-thymeleaf-export</artifactId>
7-
<version>1.0.0-SNAPSHOT</version>
7+
<version>1.0.0</version>
88
<packaging>war</packaging>
99

1010
<name>Dandelion :: Samples :: Datatables :: datatables-thymeleaf-basics</name>
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.github.dandelion</groupId>
2020
<artifactId>dandelion-datatables-samples-bom</artifactId>
21-
<version>1.0.0-SNAPSHOT</version>
21+
<version>1.0.0</version>
2222
<type>pom</type>
2323
<scope>import</scope>
2424
</dependency>

datatables-thymeleaf-export/src/main/java/com/github/dandelion/datatables/web/ExportController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.github.dandelion.datatables.core.export.ExportConf;
1515
import com.github.dandelion.datatables.core.export.ExportUtils;
1616
import com.github.dandelion.datatables.core.export.HtmlTableBuilder;
17+
import com.github.dandelion.datatables.core.export.ReservedFormat;
1718
import com.github.dandelion.datatables.core.export.XmlExport;
1819
import com.github.dandelion.datatables.core.html.HtmlTable;
1920
import com.github.dandelion.datatables.extras.export.itext.PdfExport;
@@ -42,7 +43,7 @@ public void csv(@DatatablesParams DatatablesCriterias criterias, HttpServletRequ
4243

4344
// Build the export configuration
4445
// The custom format "myFormat" is just a wrapper around pdf
45-
ExportConf exportCsvConf = new ExportConf.Builder("csv").header(true).exportClass(new CsvExport()).build();
46+
ExportConf exportCsvConf = new ExportConf.Builder(ReservedFormat.CSV).header(true).exportClass(new CsvExport()).build();
4647

4748
// Build the table to export from the data and the export configuration
4849
HtmlTable table = new HtmlTableBuilder<Person>().newBuilder("tableId", persons, request, exportCsvConf)

datatables-thymeleaf-export/src/main/webapp/WEB-INF/views/common/navbar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html xmlns:th="http://www.thymeleaf.org">
33
<body>
44
<div th:fragment="navbar">
5-
<a href="https://github.com/dandelion/dandelion-samples">
5+
<a href="https://github.com/dandelion/dandelion-datatables-samples">
66
<img style="position: fixed; top: 0; left: 0; border: 0; z-index: 1500;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png" alt="Fork me on GitHub" />
77
</a>
88
<div class="navbar navbar-fixed-top">
@@ -48,7 +48,7 @@
4848
<ul class="dropdown-menu">
4949
<li><a href="http://dandelion.github.io/datatables">Documentation</a></li>
5050
<li><a href="http://dandelion-forum.48353.x6.nabble.com/">Forum</a></li>
51-
<li><a href="https://waffle.io/dandelion/dandelion-samples">Report an issue</a></li>
51+
<li><a href="https://github.com/dandelion/dandelion-datatables-samples/issues">Report an issue</a></li>
5252
</ul>
5353
</li>
5454
</ul>

datatables-thymeleaf-export/src/main/webapp/WEB-INF/views/dom/filter-based.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ <h3>DOM sources / Filter-based export</h3>
2424
<div class="span12">
2525

2626
<div dt:conf="myTableId">
27-
<div dt:confType="export" dt:type="csv" dt:cssClass="btn" dt:url="@{/context/customCsvUrl}"></div>
27+
<div dt:confType="export" dt:type="csv" dt:cssClass="btn"></div>
2828
</div>
2929

3030
<table id="myTableId" dt:table="true" dt:export="csv">
3131
<thead>
3232
<tr>
33-
<th dt:property="id">Id</th>
34-
<th dt:property="firstName">Firstname</th>
35-
<th dt:property="lastName">Lastname</th>
36-
<th dt:property="address.town.name">City</th>
37-
<th dt:property="mail">Mail</th>
33+
<th>Id</th>
34+
<th>Firstname</th>
35+
<th>Lastname</th>
36+
<th>City</th>
37+
<th>Mail</th>
3838
</tr>
3939
</thead>
4040
<tbody>

0 commit comments

Comments
 (0)