Map在jsp页面中的遍历(Map<String, List<T>>)
来源:互联网 发布:儿童学编程好不好 编辑:程序博客网 时间:2024/05/29 10:55
JAVA代码
if(StringUtil.isNotNull(businessId)){List<AppProjPropLink> linkList = projTypeService.getCusPropByProjTypeId(businessId, metaCode);Map<String, List<AppProjPropLink>> map = new HashMap<String, List<AppProjPropLink>>();for (AppProjPropLink appProjPropLink : linkList) {if(!StringUtil.isNotNull(appProjPropLink.getMetaProp().getDictSelfGroup())){if(!StringUtil.isNotNull(map.get("未分组"))){List<AppProjPropLink> tempList = new ArrayList<AppProjPropLink>();tempList.add(appProjPropLink);map.put("未分组", tempList);}else{List<AppProjPropLink> tempList = map.get("未分组");tempList.add(appProjPropLink);map.put("未分组", tempList);}}else{if(!StringUtil.isNotNull(map.get(appProjPropLink.getMetaProp().getDictSelfGroup().getName()))){List<AppProjPropLink> tempList = new ArrayList<AppProjPropLink>();tempList.add(appProjPropLink);map.put(appProjPropLink.getMetaProp().getDictSelfGroup().getName(), tempList);}else{List<AppProjPropLink> tempList = map.get(appProjPropLink.getMetaProp().getDictSelfGroup().getName());tempList.add(appProjPropLink);map.put(appProjPropLink.getMetaProp().getDictSelfGroup().getName(), tempList);}}}model.addAttribute("map", map);}
js代码
<form id="propertyListForm" method="post"> <input type="hidden" name="projTypeId" id="projTypeId" value="${businessId}"/> <table align="center" width="100%"> <tr> <td width="40%">属性名称</td> <td width="30%">是否选择</td> <td width="30%">是否必填</td> </tr> </table> <c:forEach items="${map}" var="entry"> <fieldset> <legend>${entry.key}:</legend> <table align="center" width="100%"> <c:forEach items="${entry.value }" var="link"> <tr> <td width="40%"><label>${link.metaProp.name}</label></td> <td width="30%"><input type="checkbox" name="isChecked" value="${link.metaProp.id}" <c:if test="${link.id ne null}">checked="checked"</c:if> onclick="setDisabled('${link.metaProp.id}')"/></td> <td width="30%"><input id="${link.metaProp.id}" type="checkbox" name="isRequired" <c:if test="${link.id eq null}">disabled="true"</c:if> <c:if test="${link.isRequired eq '1'}">checked="checked"</c:if>/></td> </tr> </c:forEach> </table></fieldset></c:forEach> </form>
- Map在jsp页面中的遍历(Map<String, List<T>>)
- jsp页面遍历List<Map<String,Object>>
- List<Map<String,Object>> list 在java代码和jsp中的遍历
- jsp遍历List<Map<String,Object>>,输出<Map<String,Objectr>>
- JSP中遍历List、Map
- 遍历List<Map<String, Object>>
- List<Map<String,Object>> 遍历
- 遍历List<Map<String,Object>>
- jsp 页面中用struts2 标签遍历集合(list map)
- javaweb --- jsp页面遍历list<map>类型的数据
- cforeach遍历map(string,string) cforeach遍历map(string,list)
- Map<String, List<Object>> and Map<String, List<T>>
- struts2遍历 list中的map
- 遍历List中的Map集合
- freemarker中遍历list<map<String,String>>
- Struts2标签遍历List<Map<String, String>>
- freemarker中遍历list<map<String,String>>
- Map、List、Set在Java中的各种遍历方法
- c++多字节与宽字节字符串转换(windows平台)
- RegisterStartupScript的使用方法
- SEO基础: 提高站点在搜索引擎中的排名
- Android五大布局
- Computer Vision的尴尬---by林达华
- Map在jsp页面中的遍历(Map<String, List<T>>)
- 眼睛直观感受几种常用排序算法
- 一步一步开发自己的Openfire插件http://www.cnblogs.com/hoojo/archive/2013/03/07/2947502.html
- python手记(46)
- GPRS连接,用AT指令拨号上网
- vsftp ftp 无法上传
- 最小堆定时器的实现
- Python学习之《python核心编程》 第二章课后答案
- Hook技术