码迷,mamicode.com
首页 > 其他好文 > 详细

freemaker判断非空

时间:2014-08-27 13:13:58      阅读:464      评论:0      收藏:0      [点我收藏+]

标签:ar   html   amp   sp   size   htm   c   对象   as   

判断list非空

<#if users?exists && users?size > 0 >
    <#list users as u>
        ${u.username}-----${u.password}
    </#list>
</#if>

判断对象非空

<#if user??>
    username:${user.username}
    password:${user.password}<br/>
    y001:${user.extending.y001}<br/>
    y002:${user.extending.y002}
</#if>


freemaker判断非空

标签:ar   html   amp   sp   size   htm   c   对象   as   

原文地址:http://my.oschina.net/u/1037480/blog/307092

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!