从数据库里面获取list,在页面上怎么样让html:multibox是选中?
<tr>
<td> 用户管理 </td>
</tr>
<tr>
<td>
<html:multibox property= "search_popedom.check_pope " value= "1 " /> 账户管理
<html:multibox property= "search_popedom.check_pope " value= "2 " /> 修改密码
<html:multibox property= "search_popedom.check_pope " value= "3 " /> 权限管理
</td>
</tr>
<tr> <td> </td> </tr>
<tr>
<td> 资料管理 </td>
</tr>
<tr>
<td>
<html:multibox property= "search_popedom.check_pope " value= "4 " /> 地图管理
<html:multibox property= "search_popedom.check_pope " value= "5 " /> 编辑卡信息
<html:multibox property= "search_popedom.check_pope " value= "6 " /> 查询卡信息
</td>
从数据库里面获取的id是1,3,5,6
那我在页面上让让value是1,3,5,6选中?
------解决方案--------------------混合适
<html:multibox property= "search_popedom.check_pope " value= "3 " <%if(list.contains( "3 ")){%> checked <%}%> /> 权限管理
<html:multibox property= "search_popedom.check_pope " value= "1 " <%if(list.contains( "1 ")){%> checked <%}%> /> 账户管理
------解决方案--------------------返回的value跟 <html:multibox property= "search_popedom.check_pope " value= "4 " /
对应上,他就会自动选中