Quantcast

Could not parse as expression

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Could not parse as expression

Condor70

I created the following expression in Thymeleaf 3.0.5, but it throws a TemplateProcessingException indicating that it can't be parsed.

The expression is:

<p th:utext="#{mymessageid(@{~/myurl1(param=${myParam})},@{~/myurl2(param=${myParam})}})}"></p>

and messages.properties contains (simplified):

mymessageid=<a href="{0}">Link 1</a> or <a href="{1}">Link 2</a>

The rendered response should be:

<p><a href="/myurl1?param=x">Link 1</a> or <a href="/myurl2?param=x">Link 2</a></p>

Is there anything wrong with this expression? How can i fix it?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Could not parse as expression

Metroids
I don't really use #messages all that much, but you've got mismatched brackets in your expression... does this work?

<p th:utext="#{mymessageid(@{~/myurl1(param=${myParam})},@{~/myurl2(param=${myParam})})}"></p>
Loading...