【发布时间】:2014-07-26 14:35:40
【问题描述】:
我需要在网页中做这样的事情: 一堆显示问题和选项的行,选项由单选按钮组成。 我不知道如何将这些单选按钮的数据放入我的 java 代码中。 这是我的jsp代码:
<s:iterator value="questionsList" status="status" var="questionsList">
<tr>
<td><s:property value="title"/></td>
</tr>
<tr>
<td>
<s:radio list="{'A','B','C','D'}" name="[%{#status.index}]answer" theme="simple"/>
</td>
</tr>
</s:iterator>
我试过了
private List answer = new ArrayList();
answer = (List)request.getAttribute("[%{#status.index}]answer");
但它不起作用。 如果您有其他方法可以做到这一点,请告诉我,谢谢!
【问题讨论】: