struts多列列表显示

结合struts的iterate tag+JSTL1.1实现多列列表的显示。下面一段示例代码中显示的是2列,如果想显示多列,则直接把2改成自己想显示的列数即可。
<nested:iterate property="items" indexId="index">
                                                  
<c:if test="${index%2==0}">
                                                  
<tr>
                                                  
</c:if>   
                                                     
<td>
                                                        $
{index}
                                                     
</td> 
                                                  
<c:if test="${(index+1)%2==0}">
                                                     
</tr>
                                                
</c:if>
11                                            
12                                         </nested:iterate>
posted @ 2007-10-16 17:29 阅读(178) 评论(1)  编辑 收藏

  回复  引用  查看    
#1楼 2008-02-19 17:19 | Have a try      
这是自定义标签吧,看不懂!

标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      


相关链接: