1. 程式人生 > >freemarker list map 例項

freemarker list map 例項

直接上乾貨

<table width='80%' cellpadding='10' border='1' bordercolor='#c0c0c0' style='text-align:left;border-collapse:collapse;'>
<tr bgcolor="#E0EEEE">
<td style='text-align:center'><font color="#104E8B" size="6">XXXX</font></td>
</tr>


<#list ticketchooselist as tkcs>
<tr bgcolor="#EAEAEA"><td>${tkcs.chooseName} <#if  tkcs.chooseType="radio">(單選) <#elseif tkcs.chooseType="checkbox">(多選)</#if></td></tr>
<tr>
<td>
<#list tkcs.chooseList as cs>
<label><input name=${tkcs.chooseName} type=${tkcs.chooseType} <#list tkcs.selectedList as sel><#if sel = cs > checked='checked'</#if></#list> />${cs}
</label>
</#list>
</td>
</tr>
</#list>


<#list textList as textlt>
<tr bgcolor="#EAEAEA">
<td>${textlt.textname}</td>
</tr>
<tr>
<td>${textlt.textvalue}</td>
</tr>
</#list>


</table>


<div>
<table>
<#list imgslist as imgpath> 
<tr>
<td>圖片:${imgpath_index+1}</td>
</tr>
<tr>
<td><img src="${imgpath}" /></td>
</tr>
</#list> 
</table>
</div>
 
<#assign map = ticketMsgmap>
<div style='display: none;'>
BusinessLink:${map["BusinessLink"]};
<br/>CustomerUser:${map["CustomerUser"]};
<br/>System:${map["System"]};
<br/>Queue:${map["Queue"]};
</div>