html:radio动态生成property问题

gddennis gddennis 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
struts-config.xml中

<form-bean name="testForm" type="org.apache.struts.validator.DynaValidatorActionForm">
<form-property name="radioList" type="java.lang.String[]"/>
</form-bean>


jsp中

<html:form action="/userInvest.do">
<logic:iterate id="question" collection="${invest.questions}" indexId="index">
${index+1}.${question.questionName}<br/>
<logic:iterate id="answer" collection="${question.answers}">
<html:radio property="radioList[index]" value="${answer.answerId}">${answer.answerName}</html:radio>      
</logic:iterate>
</logic:iterate>
</html:form>


我想在动态生成html:radio时让property对应form-bean中的数组radioList,可是试了很多次都不行(radioList[${index]}也不行),请高手指教啊
...全文
评论 1
收藏 已收藏
分享
返回顶部
gddennis
Web 开发 81,108 成员 341,721 内容