freemaker中遍历list嵌套map的集合

2013/04/20 2577点热度 0人点赞 0条评论

要遍历的java代码

List<Map<String, Object>> listMap=new ArrayList<Map<String,Object>>(); 
Map<String, Object> map=new HashMap<String, Object>();
map.put("aa", "aaa");
map.put("bb", "bbb"); 
listMap.add(map);

前台代码

<#list listMap! as map>
    <#list map?keys as keystr>
        <option value="${keystr}">${map[keystr]}</option>
    </#list>
</#list>

yxkong

这个人很懒,什么都没留下

文章评论

watchseries free watch series Watch Theodosia 2022 Free Online Watch How I Met Your Father 2022 Free Online Watch Sex/Life 2021 Free Online