Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datatables Thymeleaf dialect ignores HTML5 friendly attribute names (data-dt-*) if you don't add 'dt:table="true"' #310

Open
cordin opened this issue Apr 7, 2016 · 0 comments

Comments

@cordin
Copy link

cordin commented Apr 7, 2016

Since Thymeleaf 2.1 you can use another format for the Thymeleaf and its dialects attributes, which is more compliant with HTML5. Instead of the prefix:attribute format you use the data-prefix-attribute format. See: http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#support-for-html5-friendly-attribute-and-element-names

But the Dandelion Datatables dialect is not working because it seems to be expecting always a dt:table="true" attribute into the table tag. For example:

  • This usage does not work:

<table id="MyTable" data-dt-table="true" data-dt-sortable="true">

  • But this one works:

<table id="MyTable" dt:table="true" data-dt-table="true" data-dt-sortable="true">

It even happens with the Thymeleaf eclipse plugin. Once you add the dt:table="true" the atribute autocompletion works, even for the data-dt-* variants.

@cordin cordin changed the title Datatables Thymeleaf dialect ignores HTML5 friendly attribute names (data-dt-*) Datatables Thymeleaf dialect ignores HTML5 friendly attribute names (data-dt-*) if you don't add dt:table="true" Apr 7, 2016
@cordin cordin changed the title Datatables Thymeleaf dialect ignores HTML5 friendly attribute names (data-dt-*) if you don't add dt:table="true" Datatables Thymeleaf dialect ignores HTML5 friendly attribute names (data-dt-*) if you don't add 'dt:table="true"' Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant