锁定老帖子 主题:s:iterator 遍历双重的 list
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2010-03-17
最后修改:2010-03-17
for( ){ lists.add(*); } list.add(lists); 就像上面那种形式,如何用s:iterator遍历出上面的list 点 就是 lists就是excel的行 list是每行的单元格 要在页面上同样循环出行和列 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2010-03-17
我试了好半天了 要么一行把所有的东西显示出来了
要么显示的全是最后一行的信息 |
|
返回顶楼 | |
发表时间:2010-03-17
<s:iterater >
<s:iterator><s:propert></s:propert></s:iterator><br/> </s:iterater> 未试验.... |
|
返回顶楼 | |
发表时间:2010-03-17
抛出异常的爱 写道 <s:iterater >
<s:iterator><s:propert></s:propert></s:iterator><br/> </s:iterater> 未试验.... <table border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"> <s:iterator value="list" status="st" id="obj"> <tr> <s:iterator value="#obj.lists" status="sts" id="objs"> <td title=""> <s:property value="lists.get(#sts.index)" /> </td> </s:iterator> </tr> </s:iterator> </table> 我的jsp是如上面写的 急死了。。 |
|
返回顶楼 | |
发表时间:2010-03-17
最后修改:2010-03-17
<s:iterator value="#request.list" status="st"> <tr> <s:iterator value="#request.list.get(#st.index)"> <td> <s:property /> </td> </s:iterator> </tr> </s:iterator> |
|
返回顶楼 | |
发表时间:2010-03-17
哎 数据终于可以显示了
接下来 要把excel的内容完全展现到页面上,包过单元格的格式 字体格式。。。 ╮(╯▽╰)╭ |
|
返回顶楼 | |
发表时间:2010-03-17
感觉好蛋疼
|
|
返回顶楼 | |
发表时间:2010-03-17
iaimstar 写道 感觉好蛋疼
|
|
返回顶楼 | |
发表时间:2010-03-17
<s:iterator value="bizProduct" status="stat">
<div class="box_list"> <h1>产品${stat.index+1 }名称:</h1><h2>${productsName }</h2> <s:hidden name="bizProduct[${stat.index}].productsName" /> <s:if test="${null != productsPrices && '' != productsPrices}"> <h1>产品${stat.index+1 }价格:</h1><h2>${productsPrices }</h2> <s:hidden name="bizProduct[${stat.index}].productsPrices" /> </s:if> <s:if test="${null != description && '' != description}"> <h1>产品${stat.index+1 }描述:</h1><h2>${description }</h2> <s:hidden name="bizProduct[${stat.index}].description" /> </s:if> <h1>产品${stat.index+1 }图片:</h1><h2> <s:iterator value="webPhotoInfos"> <img src="${ctx }/${smallPic }"/> </s:iterator></h2> <s:if test="${reqMethod == 'update'}"> <s:hidden name="bizProduct[${stat.index}].id" /> </s:if> </div> <div class="box_list"></div> </s:iterator> bizProduct 是一个泛型对象集,webPhotoInfos是这个泛型对象内的一个属性 |
|
返回顶楼 | |
发表时间:2010-03-17
参考这个
http://neil-jh.iteye.com/blog/316903 |
|
返回顶楼 | |