html百里香eaf直接在选项中发布
我想直接推动选定的选项。但是我找不到解决方案。也许你可以帮我吗?
我有一个带有实体列表的桌子。我将为每个实体提供选择。但是我想直接保存选择。 我需要entry.id和cat.id。
这就是我所拥有的。
<form class="myForms" id="uploadCheckerForm" method="post" th:action="@{uploadStatus}">
<table>
<tr th:replace="fragment/form-fragments::checkerMainLine()"></tr>
<tr th:each="entry : ${uploadList}">
<td><select th:id="transactionCategory" th:name="transactionCategory">
<option>Select</option>
<option th:each="cat : ${transactionCategoryList}"
th:text="${cat.name}" th:value="${cat.id}">
</option></select>
</td>
<td th:text="${entry.Comment}">
</tr>
</table>
</form>
我该怎么办,它直接发布了此信息?
感谢您的帮助!
I want directly push the selected option. But i dont find a solution. Maybe u can help me?
I have a table with a list of entities. And i will offer a select for every entity. But i want to save the selection directly.
I need the entry.id and the cat.id.
This is what i have.
<form class="myForms" id="uploadCheckerForm" method="post" th:action="@{uploadStatus}">
<table>
<tr th:replace="fragment/form-fragments::checkerMainLine()"></tr>
<tr th:each="entry : ${uploadList}">
<td><select th:id="transactionCategory" th:name="transactionCategory">
<option>Select</option>
<option th:each="cat : ${transactionCategoryList}"
th:text="${cat.name}" th:value="${cat.id}">
</option></select>
</td>
<td th:text="${entry.Comment}">
</tr>
</table>
</form>
What have i to do, that it directly post this infos?
Thanks for help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将您的
输入
的一些唯一标识符附加到您的&lt; select
的名称中,然后使用某种分离器,然后在后端上接受形式数据。这样的Kinda:html
控制器
I would append some unique identifier of your
entry
to the name of your<select>
with some sort of separator and then accept form data on backend to a Map. Kinda like this:HTML
Controller