---
title: "struts双层iterator嵌套"
author: "mousepc"
date: "2012-02-15T19:14:40Z"
tags: []
categories: ["编程语言"]
slug: "struts-iterator"
draft: false
lastmod: "2012-02-15T19:30:37Z"
id: 1407537
url: "https://mousepc.iteye.com/blog/1407537"
---

有点乱，没有修改，直接贴的自己的代码，有用到的自己看吧。

 

 

```
<s:if test="facilityBO!=null && facilityBO.facilityAlbumVOs!=null && facilityBO.facilityAlbumVOs.size>0">
					<s:iterator value="facilityBO.facilityAlbumVOs" status="stat" var="parent">
						<tr>
							<td><s:property value="albumName" /></td>
							<td>
							<table width="99%">
							<tr>
								<td>
						<table id="detailTable" border="1" cellspacing="0" cellpadding="2"
							bordercolor="#99CC66">
							<cl width="10%" />
							<cl width="20%" />
							<cl width="20%" />
							<cl width="20%" />
							<cl width="20%" />
							<tr bgcolor="#99CC66" bordercolor="#FFFFFF" id="tr0">
								<th>
									&nbsp;
								</th>
								<th>
									Title
								</th>
								<th>
									Photo
								</th>
								<th align="center">
									Version
								</th>
								<th>
									Remark
								</th>
							</tr>
							<s:if test="#parent.facilityPhotoVOs!=null">
								<s:iterator value="#parent.facilityPhotoVOs" var="child" status="stat2">
									<tr valign="top">
										<td>
											<input type="hidden" name="fpId" value='<s:property escape="true" value="#child.fpId"/>'>
										</td>
										<td>
											<a href="javascript:downLoadFile('<s:property escape="true" value="#child.dmsVO.documentId"/>','<s:property escape="true" value="#child.dmsVO.fileVersion"/>','<s:property escape="true" value="#child.dmsVO.fileName"/>')">
												<s:property value="#child.dmsVO.fileName" /></a>
										</td>
										<td>
											<s:property value="#child.dmsVO.fileName" />
										</td>
										<td>
											<a href="javascript:detailVersion('<s:property escape="true" value="#child.dmsVO.documentId"/>')">
												<s:property value="#child.dmsVO.fileVersion" /></a>
										</td>
										<td>
											<s:textarea readonly="true" name="fileRemarks" cols="60" rows="2"
												value="%{#child.dmsVO.fileRemark}"></s:textarea>
										</td>
									</tr>
								</s:iterator>
							</s:if>
						</table>
					</td>
				</tr>
			</table>
							</td>
						</tr>
					</s:iterator>
				</s:if>
```