I want to use the index of an thymeleaf-loop as arrayindex inside. Example:
<div th:each="service : ${requestedServices}">
<div class="col-sm-1">
<input type="checkbox" th:checked=*{service[index of loop?].requested}">
</div>
</div>
I'll already tried to use serviceStat.index inside the array
${requestedServices} is an ArrayList of Requested Service
class RequestedService {
Service service
boolean requested
}
class Service {
String name;
int value;
}
I hope to find an answer for my problem