struts的循环标签的使用

<logic:present name="carvingCertificateList">
      <% int i = 0 ,j = 0;%>
        <logic:iterate id="carvingCertificate" name="carvingCertificateList">
         <% i++; j = i%2; pageContext.setAttribute("j",new Integer(j));%>
           <tr bgcolor="<c:choose><c:when test='${j>0}'>#F4F0E7</c:when><c:otherwise>#F9F7F2</c:otherwise></c:choose>"
          οnmοuseοver="this.bgColor = '#EAE2D0'" onMouseOut="this.bgColor=<c:choose><c:when test='${j>0}'>'#F4F0E7'</c:when>
          <c:otherwise>'#F9F7F2'</c:otherwise></c:choose>">
           <td height="26">&nbsp;</td>
           <td height="26"><c:out value="${carvingCertificate.createDate}"/></td>
           <td height="26"><c:out value="${carvingCertificate.carvingCertificateNum}"/></td>   
     <bean:define id="sealdatas" name="carvingCertificate" property="sealDatas"/>
          <td height="26">
    <logic:present name="sealdatas">
     <logic:iterate id="seal" name="sealdatas">
      <bean:write name="seal" property="sdsealName"/>
     </logic:iterate>
    </logic:present>
    </td>
          <!-- 操作-->
          <td height="26" colspan="2" width="262px"><a href="toPrintAction.do?SNO=${carvingCertificate.sno}" style="display:block; width:75px; float:left;"  target="_blank">本次备案打印</a> <a href="historyCertList.do?SNO=${carvingCertificate.sno}" style="display:block; width:75px; float:right;  margin-right:5px; margin-left:5px;"  target="_blank">历史备案打印</a></td>
           </tr>
        </logic:iterate>
     </logic:present>

 

 

在里面那层的循环如果是外层对像的一个属性则需要重新定义一个变量

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值