Using the #object expression variable in Spring

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

Using the #object expression variable in Spring

meyertee
Using the #object expression variable results in an error since version 1.1.3.
I filed an issue with a test case here https://sourceforge.net/tracker/?func=detail&aid=3467114&group_id=509826&atid=2072659

The sample template code looks like this:
<nav th:object="${context}" th:with="key='test'">
        <a th:href="${#object.getPath(key)}">Test</a>
</nav>

I haven't found an alternative to make this work - accessing both $-variables and the *-selected object in one expression. These don't work:
<a th:href="*{getPath(key)}">Test</a>
<a th:href="*{getPath(${key})}">Test</a>

Is there another way?

Cheers, Thomas.
Reply | Threaded
Open this post in threaded view
|

Re: Using the #object expression variable in Spring

danielfernandez
Administrator

Yup, that was a bug :-(

Fixed in 1.1.4-SNAPSHOT, thanks!