I'm learning Spring MVC + Thymeleaf in school and I have run into an issue with an assignment. As you can see I use th:each to iterate through a list of deliverables. I want the user to enter the grade that they receive for each deliverable that is displayed. The issue is getting access to the grade data when the form posts back to the mapping controller method. I am not sure how to access each deliverable.grade individually. I can get access to the first it seems. Any help is appreciated. Thanks.
<form th:object="${deliverable}" action="#" th:action="@{/process/inputGrades}" method="POST" class="form-horizontal" role="form">
<div class="form-group" th:each="deliverable : ${deliverableList}">
<p>Deliverable Name<span th:text="${deliverable.name}" class="badge tab-space"></span></p>
<p>Deliverable Weight<span th:text="${deliverable.weight}" class="badge tab-space"></span></p>
<h3><span class="label">Grade:</span></h3>
<input type="text" th:value="${deliverable.grading}" id="grading" name="grading" class="form-control" required="required"/>
</div>