Skip to content
Thymeleaf dialect for data attributes
Branch: master
Clone or download
Latest commit 0589434 May 30, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
thymeleaf-extras-data-attribute version bump May 28, 2016
LICENSE.txt Update LICENSE.txt May 20, 2016
README.md Update README.md May 30, 2016

README.md

thymeleaf-extras-data-attribute

Thymeleaf dialect for data attributes

Setup

Maven

<dependency>
    <groupId>com.github.mxab.thymeleaf.extras</groupId>
    <artifactId>thymeleaf-extras-data-attribute</artifactId>
    <version>2.0.1</version>
</dependency>

Code

templateEngine.addDialect(new DataAttributeDialect());

Usage

Source

<html>
<body data:foo="${'bar'}" data:msg="#{my.message}" >
</body>
</html>

Result

<html>
<body data-foo="bar" data-msg="Your resolved message" >
</body>
</html>

Credits

Big shout-out to @dtrunk90 who rewrote everything for Thymeleaf 3.0

You can’t perform that action at this time.