{jsp 循环显示list内容}

来源:互联网 发布:js中如何格式化日期 编辑:程序博客网 时间:2024/04/30 22:50
<table align="center" width="98%" border="0" cellspacing="1" cellpadding="0" class="resulttable"><tr><th width="18%">卡种类型</th><th width="82%">卡种等级</th></tr><c:if test="${ empty command.cardList}"><tr><td align="center" colspan="10" class="oddbgc" >无记录</td></tr></c:if><c:if test="${ not empty command.cardList}"><c:forEach  var="bean" items="${ command.cardList}" varStatus="s"><c:if test="${bean.dataLevel=='1'}"><tr><td align="left" class="<c:choose ><c:when test='${s.index%2 ==0}'>oddbgc</c:when><c:otherwise>evenbgc</c:otherwise></c:choose>"> <c:out value="${bean.cardName}"/></td><td align="left" class="<c:choose ><c:when test='${s.index%2 ==0}'>oddbgc</c:when><c:otherwise>evenbgc</c:otherwise></c:choose>"><c:forEach  var="childbean" items="${ command.cardList}" varStatus="sr"><c:if test="${bean.cardCode eq childbean.parentCardCode}"><c:out value="${childbean.cardName}"/></c:if></c:forEach></td></tr></c:if></c:forEach></c:if></table>

0 0
原创粉丝点击