map的键尽量是字符串或者数字类型:
<#if map?exists>
<#list map?keys as key>
${key}---${map[key]}
</#list>
</#if>
 

Freemarker遍历map的更多相关文章

  1. java与freemarker遍历map

    一.java遍历MAP /** * 1.把key放到一个集合里,遍历key值同时根据key得到值 (推荐) */ Set set =map.keySet(); Iterator it=set.iter ...

  2. freeMarker遍历map的正确方式

    假设selectDateModel 是我们后台返回的map<String, String>; <#list selectDateModel?keys as key> <o ...

  3. 遍历map的四种方法

    方法一  在for-each循环中使用entries来遍历这是最常见的并且在大多数情况下也是最可取的遍历方式.在键值都需要时使用.注意:for-each循环在Java 5中被引入所以该方法只能应用于j ...

  4. java 遍历map 方法 集合 五种的方法

    package com.jackey.topic; import java.util.ArrayList;import java.util.HashMap;import java.util.Itera ...

  5. Java中遍历Map集合的四种方法

    在Java中如何遍历Map对象 How to Iterate Over a Map in Java 在java中遍历Map有不少的方法.我们看一下最常用的方法及其优缺点. 既然java中的所有map都 ...

  6. Java中如何遍历Map对象的4种方法

    在java中遍历Map有不少的方法.我们看一下最常用的方法及其优缺点. 既然java中的所有map都实现了Map接口,以下方法适用于任何map实现(HashMap, TreeMap, LinkedHa ...

  7. java遍历map的四种方式

    在Java中如何遍历Map对象 How to Iterate Over a Map in Java 在java中遍历Map有不少的方法.我们看一下最常用的方法及其优缺点. 既然java中的所有map都 ...

  8. 数组遍历map和each使用

    <body> <input type="/> <input type="/> <input type="/> </b ...

  9. 【freemaker】之文本,html文本,去除空格,字母大小写,循环数组,字符串截取,map取值,遍历map

    测试代码 @Test public void test06(){ try { root.put("emp", "<span color='red'>你好张三& ...

随机推荐

  1. wamp开机自启动

    其实非常简单!打开服务管理,把以下两个服务,由手动(默认状态)改为自动即可: wampapache wampmysqld

  2. hibernate query.list() 返回的数据类型

    在hibernate中,用hql语句查询实体类,采用list方法的返回结果为一个List,该List中封装的对象分为以下三种情况: 1.查询全部字段的情况下,如"from 实体类" ...

  3. Redis系列-配置文件小结

    如果不指定配置文件,Redis也可以启动,此时,redis使用默认的内置配置.不过在正式环境,常常通过配置文件[通常叫redis.conf]来配置redis. redis.conf配置格式如下: ke ...

  4. POI文件导出至EXCEL,并弹出下载框

    相关参考帖子 : [1]http://www.tuicool.com/articles/MnqeUr [2]http://www.oschina.net/question/253469_51638?f ...

  5. http://www.htmleaf.com/ziliaoku/qianduanjiaocheng/

    http://www.htmleaf.com/ziliaoku/qianduanjiaocheng/ box-shadow  :   http://blog.csdn.net/freshlover/a ...

  6. 【leetcode】Fraction to Recurring Decimal

    Fraction to Recurring Decimal Given two integers representing the numerator and denominator of a fra ...

  7. SpringMVC中Controller跳转到另一个Controller方法

    1.直接Redirect后加 Controller/Action Response.Redirect("/User/Edit"); return Redirect("/U ...

  8. cairo-1.14.6 static compiler msys mingw32

    gtk2.x 静态编译时 需要注意的是 cairo cairo 1.14.x 使用了 mutex , 用动态方式时 DllMain 中调用了 CAIRO_MUTEX_INITIALIZE () 在静态 ...

  9. Java for LeetCode 232 Implement Queue using Stacks

    Stack<Integer> stack=new Stack<Integer>(); public void push(int x) { stack.push(x); } // ...

  10. C#封装C++DLL

    1.新建一个C#-Windows-类库(用于创建C#类库(.dll)的项目)类型的工程 2.对于普通C++函数 XXXX_API void cppFun(int i); 在cs代码中添加 [DllIm ...