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>
<!--对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>
相关文章推荐
- jsp页面使用logic标签迭代list
- jsp页面使用el按key获取map中的对应值
- jsp页面使用el 按key获取map中的对应值
- 一段可以使用的 hibernate获得对象->action存入List->jsp页面用<s:iterator>迭代的代码
- jsp页面使用el 按key获取map中的对应值GOOD
- struts2第十七讲学习笔记,Action处理复选框与JSP页面使用ognl处理map
- Jsp 页面迭代中使用<s:if>判断动态变量值
- jsp页面把获取的map数据转换成json格式的数据来使用
- JSP 页面中使用FCKeditor控件(js用法)
- JSP页面中四种“返回按钮”的使用
- 使用struts框架的简单jsp登录页面
- 正则表达式运用到JSP页面(使用在input 标签内)
- jsp页面使用${}不起作用
- springmvc中的jsp页面<c:if>的使用
- 在JSP页面中使用JDBC连接MySQL数据库的方法
- 在JSP页面中如何使用JavaBeans控件?
- Java Web中使用JSPSmartUpload控件实现文件的上传和下载(解决了中文乱码问题)(JSP页面采用GBK编码)
- 在jsp页面导入要使用的js文件
- JSP 中使用EL遍历MAP
- 在JSP页面中使用JavaBeans组件