Struts 的复选框问题
<%
int i=0;
%>
<TD align=right height=35 width= "15% "> 服务名(*): </TD>
<TD width= "85% ">
<TABLE cellSpacing= "0 " cellPadding= "0 " width= "60% " border= "0 " height=50>
<logic:iterate id= "serviceItem " name= "serviceName ">
<tr>
<td align= "center ">
<html:multibox property= "service ">
<%
out.print(i);
i++;
%>
</html:multibox>
<bean:write name= "serviceItem "/>
</td>
</tr>
</logic:iterate>
通过上面这个功能 我把数据库中服务名相应的显示页面上 提供选择
但是我在选择提交后发觉 选中的服务名 返回ACTION的值是0,1,2 等
下面是运行代码后的页面代码 可以看到value是0 而不是咨询
<td align= "center ">
<input type= "checkbox " name= "service " value= "0 ">
咨询
</td>
有什么办法可以将value改变吗? 谢谢了
------解决方案-------------------- <logic:iterate id= "serviceItem " name= "serviceName ">
<tr>
<td align= "center ">
<html:multibox property= "service ">
<bean:write name= "serviceItem "/>
</html:multibox>
</td>
</tr>
</logic:iterate>
试一下