首页 > 其他 > 详细

freemark语法

时间:2015-05-18 16:53:32      阅读:131      评论:0      收藏:0      [点我收藏+]

if 判断:

<#if n = 0>
...
<#elseif (my_resume.getPhotoName()?substring(0,7))!="http://">
...
<#else> 
...
</#if>

String字符串操作

1.截取字符串      ${str?substring(0,7)}

2.判断是否为空,为空时 给默认值    ${my_resume.getJobFunction1_Name()?default("")?html}

List集合操作

1.判断集合是否存在,集合大小 <#if my_resume.getMy_EducationList()?exists&&(my_resume.getMy_EducationList()?size>0)></#if>

2.迭代集合
<#list my_resume.getMy_EducationList() as being>
<tr align="center" valign="middle">
<td class="fieldContent">${being.getBeginDate()}~${being.getEndDate()}</td>
<td class="fieldContent">${being.getSchoolName()}</td>
<td class="fieldContent">${being.getSpeciality()}</td>   
<td class="fieldContent">${being.getDegreeName()}</td>
<td class="fieldContent">${being.getCertificate()}</td>
</tr>
</#list>

freemark语法

原文:http://blog.csdn.net/wanglei0622/article/details/45821927

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!