• jsp中跳出循环


    <c:otherwise>
        <c:set var="flag" value="true" /><!-- 设置flag -->
        <c:forEach items="${roleDepartList}" var="roleDepart" varStatus="status">
            <c:set var="isEqual" value="false"></c:set><!--假如外层循环的内层循环中没有找到相等的,则标记不相等,并且把不相等的显示出来-->
            <c:if test="${(status.index+1) % cols == 1}"><tr></c:if><!--每cols列之后就换行-->
                <c:forEach items="${selectedRoleIdList}" var="selectedRole" varStatus="roleIndex">
                    <c:if test="${selectedRole.roleId == roleDepart.roleId}">
                        <td><input type="checkbox" id="roleId${status.index+1}" checked name="roleId" title="${roleDepart.roleName }" value="${roleDepart.roleId }"></td>
                        <c:set var="isEqual" value="true"></c:set><!--假如外层循环的内层找到相等的,则显示相等的,并跳出当前循环,继续外层循环-->
                        <c:set var="flag" value="false"/><!--为false则跳出当前循环,继续外层循环 -->
                    </c:if>
                </c:forEach>
                <c:if test="${isEqual=='false' }">
                    <td><input type="checkbox" id="roleId${status.index+1}" name="roleId" title="${roleDepart.roleName }" value="${roleDepart.roleId }"></td>
                </c:if>
            <c:if test="${(status.index+1) % cols == 0}"></tr></c:if>
        </c:forEach>
    </c:otherwise>
  • 相关阅读:
    Privacy Policy
    MINE
    IOS的浅拷贝和深拷贝
    Mine
    IOS8Preview-xCode_6
    IOS8Preview-Huge for developer and Massive for everyone else
    java-Filter
    Java-servlet
    Java-基本的程序设计结构
    银行应用系统安全性设计(3):密钥及其管理
  • 原文地址:https://www.cnblogs.com/nizuimeiabc1/p/7875814.html
Copyright © 2020-2023  润新知