Html 如何将模型绑定到spring from tag单选按钮以填充列表?
我正在尝试将listOftriptransactions列表绑定到单选按钮。在我的情况下,当更新值时,单击单选按钮值未得到更新后,它将采用以前的值Html 如何将模型绑定到spring from tag单选按钮以填充列表?,html,spring,jsp,spring-mvc,Html,Spring,Jsp,Spring Mvc,我正在尝试将listOftriptransactions列表绑定到单选按钮。在我的情况下,当更新值时,单击单选按钮值未得到更新后,它将采用以前的值 <table> <c:forEach items="${listOftriptransactions}" var="trans" varStatus="mystatus"> <tr> <td> <form:radiobutton path="${li
<table>
<c:forEach items="${listOftriptransactions}" var="trans" varStatus="mystatus">
<tr>
<td>
<form:radiobutton path="${listOftriptransactions[mystatus.index].isReceived}" checked="checked" />yes
<form:radiobutton path="${listOftriptransactions[mystatus.index].isReceived}" checked="checked" />No
</td>
</tr>
</c:forEach>
</table>
对
不
如果有其他解决方案,请让我知道。请提前感谢尝试以下方法:
<table>
<c:forEach items="${listOftriptransactions}" var="trans" varStatus="mystatus">
<tr>
<td>
<form:radiobutton path="listOftriptransactions[${mystatus.index}].isReceived" value="true">Yes</form:radiobutton>
<form:radiobutton path="listOftriptransactions[${mystatus.index}].isReceived" value="false">No</form:radiobutton>
</td>
</tr>
</c:forEach>
</table>
对
不