th:field doesn't compile

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

th:field doesn't compile

Casper
I'm creating a web app with Spring MVC, thymeleaf and hibernate. I have a weird problem what proberally has a logic explanation.

My problem: My th:field attribute doesn't compile in a bit of code where I want to iterate over a list of objects (entities). This way I'm never able to post that list.

I am aware of the double th:field for users, this was just for testing purposes.

The bit of code where the th:field's do not compile

<br /> users <br />
    <ul id="userGroupContainer" >
        <li th:each="u, rowStat : ${userNotInGroup}" th:value="${userNotInGroup[__${rowStat.index}__]}" th:text="${userNotInGroup[__${rowStat.index}__].displayName}" th:field="*{users[__${rowStat.index}__]}" class="clickable unselected"></li>
                                                </ul>
<ul id="userGroupContainerSelected" th:field="*{users}">
        <li th:each="ug, rowStat : *{users}" th:value="*{ug}" class="clickable selected">Selected</li>
</ul>

Little explanation, The code contains 2 lists. In these 2 lists i load a list(java.util.List) of objects, these object can be switched from list 1 to list 2 with a bit of jquery code.
Reply | Threaded
Open this post in threaded view
|

Re: th:field doesn't compile

Zemi
Administrator
Hello,

I don't see any syntax error in your th:field expression.

What's the error?

Regards,
  Zemi