freeMarker 遍历 list,map,list<map>
来源:互联网 发布:阿里 开发的数据库 编辑:程序博客网 时间:2024/05/18 03:39
List
List<String> clientSourceData=new ArrayList<String>();clientSourceData.add("field字段");clientSourceData.add("title标题");
ftl:
<#if clientSourceData?exists> <#list clientSourceData as key> <tr> <td>${key}</td> </tr> </#list> </#if>
Map
Map<String,String> clientSourceData=new HashMap<String,String>();clientSourceData.put("field", "字段");clientSourceData.put("title", "标题");
ftl:
<#if clientSourceData?exists> <#list clientSourceData?keys as key> <tr> <td>${key}</td> <td>${clientSourceData[key]}</td> </tr> </#list> </#if>
List<Map>
List<Map<String,String>> columns=new ArrayList<Map<String,String>>();for(int i=0;i<10;i++){Map<String,String> col=new HashMap<>();col.put("field", "字段"+i);col.put("title", "标题"+i);columns.add(col);}
ftl:
<#list columns as col>{field : ${col["field"]},halign:'center',title : ${col["title"]},}</#list>
0 0
- freeMarker 遍历 list,map,list<map>
- freemarker中的map和list遍历
- freemarker中遍历list<map<String,String>>
- freemarker中遍历list<map<String,String>>
- freemarker list map 实例
- freemark-----------list(list,map遍历)
- STL MAP LIST 遍历
- JS 遍历map List
- STL MAP LIST 遍历
- js Map List 遍历
- List,Map的遍历
- 遍历list map set
- 遍历Map和List
- velocity map list 遍历
- jstl 遍历List<Map>
- Thymeleaf基础 遍历List、Map、List<map>、Map<List>
- FreeMarker集合(List、Map)
- FreeMarker集合(List、Map)
- 使用php自己实现所需接口(需要php基础)
- ClassLoader 详解及用途
- POJ题目分类
- 《MarkDown》语法笔记
- 统计学习方法第二章笔记
- freeMarker 遍历 list,map,list<map>
- 使用Python工具分析风险数据 20160723
- 当file_get_contents或者simplexml_load_file的时候乱码
- ZRANGEBYSCORE
- mysql忘记root密码重设密码
- 【Java基础】包、类、接口、常量、方法、变量的命名规则
- 使用ClassLoader类装载器获取系统资源
- ionic+angularjs+cordova创建项目、启动服务
- 如何批量修改PSA的数据