Skip to content

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

Description

@cordin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions