dandelion / dandelion-datatables

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

[CLOSED] Thymeleaf AJAX handling of URLs ending with json #190

Closed tduchateau closed 10 years ago

tduchateau commented 10 years ago

Issue by harbulot from Wednesday Aug 14, 2013 at 14:55 GMT


(This is using Thymeleaf 2.0.17 and Dandelion DataTables 0.8.14.)

When using an AJAX table, like this, the URL used to fetch the data is http://.../myapp/test?sEcho=..., as expected:

<table dt:url="@{/test}" dt:serverSide="true" ...>

However, when the URL ends with json (with or without a dot):

<table dt:url="@{/test.json}" dt:serverSide="true" ...>

The URL (as requested by the browser) becomes http://.../myapp/@%7B/test.json%7D?sEcho=....

For some reason, the @{...} pattern is placed straight into this part of the URL (and URL-encoded), without being interpreted as it should.

I don't think this is a Thymeleaf issue, since the same URL works fine in other elements (e.g. <img th:src="@{...}" />.

tduchateau commented 10 years ago

Comment by tduchateau from Wednesday Aug 14, 2013 at 19:09 GMT

Hi,

Indeed, I can reproduce it using Thymeleaf 2.0.17 and Dandelion-Datatables 0.8.14.

However, the issue is fixed using the v0.9.0-SNAPSHOT (or the upcoming 0.9.0)

Regards, Thibault