Timelear: Add to existing values ​​instead of replacing them.

Is there any way to tell Thymeleaf add parameters to the tag instead of overriding them?

Example:

  <div class="a" th:class=${x ? 'b' : 'c'}> 

Should arise either

 <div class="ab"> 

or

 <div class="ac"> 

Hello

+1
java spring spring-mvc thymeleaf
Feb 20 '16 at 22:51
source share
1 answer

Another way to do this:

 th:attr="class=|a ${x ? 'b' : 'c'}|" 
+4
Feb 21 '16 at 8:18
source share



All Articles