您的位置:首页 > Web前端 > JavaScript

jsp页面使用logic标签迭代map

2010-11-23 11:10 239 查看
//对map的迭代显示,其中value的值为list类型
<!--对IGPRR01031VO中的对象roleMap进行判断,如存在则执行内部代码-->
<logic:present name="IGPRR01031VO" property="roleMap">
<!--对roleMap中的内容进行迭代显示-->
<logic:iterate id="map" name="IGPRR01031VO" property="roleMap"
indexId="num">
<!--取出map中的value值-->
<bean:define id="list" name="map" property="value"
type="java.util.ArrayList" />
<!--取出map中的key值-->
<bean:define id="name" name="map" property="key" />

<tr>
<td colspan="3">
<div class="title">
<div class="name"><ig:codeValue ccid="ROLE_CATEGORY_CODE"
cid="${name}" /></div>
</div>
</td>
</tr>
<tr>
<!--显示map的key内容,其中${name}即为key值-->
<th width="30%"><label> <input type="checkbox"
name="${name}" id="${name}"
onclick="selectAll('${name}','${name}roleids')" /> </label></th>
<th width="40%">部门名称</th>
<th width="30%">主办部门</th>
</tr>
<!--迭代与key对应的list值-->
<logic:iterate id="v" name="list" indexId="index">
<tr class="<ig:rowcss index="${index}"/>">
<td height="20"><label> <input type="checkbox"
name="${name}roleids" value="${v.roleid}"> </label></td>
<td>${v.rolename}</td>
<td><html:radio property="ppsuper" value="${v.roleid}"
name="IGPRR0102Form" styleId="ppsuper" /></td>
</tr>
</logic:iterate>
</logic:iterate>

</logic:present>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: