Expose a method in Thymeleaf

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Expose a method in Thymeleaf

Hello all.
I'm a new user, so, I'm sorry if this is a too basic question, but I've tried searching it and couldn't find any results.

I've been working to integrate Thymeleaf in a brazilian web portal product and I want to be able to do something like:

<div th:text="${myfunc('some val')}"></div>

(calling a custom method from Thymeleaf).

In the integration, I've already created a custom IContext to expose some custom variables (this is working perfectly).

How could I do that?

Thanks !