码迷,mamicode.com
首页 > 其他好文 > 详细

使用struts的logic:iterate标签遍历列表时得到显示序号

时间:2017-01-07 18:00:14      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:pre   color   使用   strong   list   idt   部分   dex   class   

<logic:notEmpty name="sList" scope="request">
    <logic:iterate id="element" indexId="index" name="sList">
        <tr>
            <td width="50"><%= index.intValue() + 1 %>.</td>
            <td><bean:write name="element"/></td>
        </tr>
    </logic:iterate>
</logic:notEmpty>

关键是indexId="index"<%= index.intValue() + 1 %> 两部分。

使用struts的logic:iterate标签遍历列表时得到显示序号

标签:pre   color   使用   strong   list   idt   部分   dex   class   

原文地址:http://www.cnblogs.com/xiandedanteng/p/6259698.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!