标签:
map freemarker遍历 fremarker中map的key必须是String,否则无法取到value。 (1)map<String,基本数据类型> <#if clientSourceData?exists> <#list clientSourceData?keys as key> <tr> <td>${key}</td> <td>${clientSourceData【key】}</td> </tr> </#list> </#if> (2)map<String,javaBean> <#list clientSourceData?keys as key> <tr> <td>${key}</td> <td>${clientSourceData[key].id}</td> </tr> </#list> (3)map<String,List<Javabean>> <#list clientSourceData?keys as key> <tr> <td>${key}</td> </tr> <tr> <td> <table> <#list clientSourceData[key] as data> <tr> <td>${data.id}</td> </tr> </#list> </table> </td> </tr> </#list>
标签:
原文地址:http://my.oschina.net/cavaliersyb/blog/473018