I am using Thymeleaf 3 within a Spring Boot application. Currently I am in a situation where I want to use a message expression inside an EL expression (Spring EL).
First use case: trim the message
data:title="${#{message.key}.trim()}
Second use case: conditionally create an attribute with a message as its value
data:title="${condition ? #{message.key} : ''}
Both examples will produce a syntax error, because #{
is not an allowed start of an expression.
Any ideas how to achieve what I want?