资源管理里面根据权限来是否显示create按钮
<c:forEach items="${resourceList}" var="resource">
<tr data-tt-id='${resource.id}' <c:if test="${not resource.rootNode}">data-tt-parent-id='${resource.parentId}'</c:if>>
<td>${resource.name}</td>
<td>${resource.type.info}</td>
<td>${resource.url}</td>
<td>${resource.permission}</td>
<td>
<c:if test="${resource.available==true}">
<!-- <i class="fa fa-check"></i> -->显示
</c:if>
<c:if test="${resource.available==false}">
<!-- <i class="fa fa-close"></i> -->隐藏
</c:if>
</td>
<td><i class="${resource.faicon}"></i></td>
<td>${resource.sort}</td>
<td>
<shiro:hasPermission name="resource:create">
<c:if test="${resource.type ne 'button'}">
<a href="${base}/resource/${resource.id}/appendChild" class="btn btn-green" data-toggle="dialog" data-id="node_add_child" data-mask="true">添加子节点</a>
</c:if>
</shiro:hasPermission>
<shiro:hasPermission name="resource:update">
<a href="${base}/resource/${resource.id}/update" class="btn btn-green" data-toggle="dialog" data-id="node_edit" data-mask="true">修改</a>
</shiro:hasPermission>
<c:if test="${not resource.rootNode}">
<shiro:hasPermission name="resource:delete">
<a href="${base}/resource/${resource.id}/delete" class="btn btn-red" data-toggle="doajax" data-type="get" data-confirm-msg="确定要删除吗?">删</a>
</shiro:hasPermission>
</c:if>
</td>
</tr>
</c:forEach>
这样的遍历会非常慢,如何改进?原因是<shiro:hasPermission>引起的