1.代码
<table width="100%" height="0%" border="0">
<tr align="center" valign="middle">
<td height="46%" colspan="6" class="td_head">
<B>角色名称 </B>
</td>
</tr>
<tr>
<#list roles as role>
<td nowrap align='right' colspan='1' rowspan='1' height='25'>
<!-- 被选择的 checkbox -->
<#list bean.roles as userRole>
<!-- 不加此句 <#assign checked="checked"> 被执行后 checked的值将一直为"checked" -->
<#assign checked="">
<#if role.id==userRole.id>
<#assign checked="checked">
<#break/>
</#if>
</#list>
<input name="roleid" type="checkbox" userid="roleid" value="${role.id!}" ${checked!}>
</td>
<td nowrap align='left' colspan='1' rowspan='1' height='25'>
${role.rolename!}
</td>
<!-- 每显示三个对象换一行 -->
<#if (role_index != 0 && role_index % 2 == 0)>
</tr>
<tr>
</#if>
</#list>
</tr>
</table>
2.例图