Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

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

About

Thymeleaf dialect for data attributes

Resources

License

Packages

No packages published

Languages