Created
April 22, 2017 14:25
-
-
Save romach/10081ba3e24ffc9f75aadada7df80df8 to your computer and use it in GitHub Desktop.
Concatenate strings in Thymeleaf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p th:text="${bean.field + '!' + bean.field}">Static content</p> | |
th:text="'static part' + ${bean.field}" | |
th:text="${'static part' + bean.field}" |
Glad to be of help :)
Thanks @marcian-dao the exact snippet I was looking for!!:)
Thank you very much
Love this, all what most blogs talk about is using th:inline which is annoying way compared to easy + '' + approach you have given here. Thanks for this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@marcian-dao , that approach worked for me. Thanks!