Thymeleaf Form Submit With Arraylist Object
I have written a simple program for form submit with the data(ArrayList) to send from table to controller class. While submitting the form the data is always empty not sure what I
Solution 1:
<td />
elements aren't submitted with a form. You need to use some kind of input. It should look something like this:
<td class="table-data">
<input type="text" th:field="*{accountList[__${stat.index}__].accountnumber}" />
</td>
or if you want to submit without seeing the fields as editable, something like this
<td class="table-data">
<span th:text="${account.accountnumber}" />
<input type="hidden" th:field="*{accountList[__${stat.index}__].accountnumber}" />
</td>
Post a Comment for "Thymeleaf Form Submit With Arraylist Object"