<%@ taglib uri="/struts-tags" prefix="webwork" %>


<%/*This is just a sample table layout that I sometimes use.
   * it shows fine on Internet Explorer but does not always look
   * so good on Netscape ( a blank cell will show up as balck)
   * you can modify this to shopw the table any way you want
   *
   * NOTE : this should currently be included within the context of the
   * webTable bean.
   *
   */%>

<webwork:if test=". != null">
	<webwork:if test="model != null">
		<p align="center">
			<table bgcolor="white" border="0" cellpadding="1" cellspacing="0" >
				<tr>
					<td>
						<table  border="0" cellpadding="2" cellspacing="1">

						<tr bgcolor="yellow">

						<%/* Show the visible column names.  Use the display name that can
						   * be set in the jsp.
						   */%>
							<webwork:iterator value="columns" id="curColumn">
								<webwork:if test="visible == true">
									<th>
										<webwork:if test="sortable == true">
											<table border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td>
														<webwork:property value="displayName" escape="false"/>
													</td>
													<td>
														<table border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td align="bottom">
																	<webwork:if test="(sortColumn == offset) && (sortOrder == 'ASC')">
																		<img src="images/sorted_asc.gif" border="0" align="bottom"/>
																	</webwork:if>
																	<webwork:else>
																		<a href="<webwork:url><webwork:param name="sortColumnLinkName" value="offset"/><webwork:param name="sortOrderLinkName" value="'ASC'"/></webwork:url>"><img src="images/unsorted_asc.gif" border="0" align="bottom"/></a>
																	</webwork:else>
																</td>
															</tr>
															<tr>
																<td align="top">
																	<webwork:if test="(sortColumn == offset) && (sortOrder == 'DESC')">
																		<img src="images/sorted_desc.gif" border="0" align="top"/>
																	</webwork:if>
																	<webwork:else>
																		<a href="<webwork:url><webwork:param name="sortColumnLinkName" value="offset"/><webwork:param name="sortOrderLinkName" value="'DESC'"/></webwork:url>"><img src="images/unsorted_desc.gif" border="0" align="top"/></a>
																	</webwork:else>
																</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</webwork:if>
										<webwork:else>
											<webwork:property value="displayName" escape="false"/>
										</webwork:else>
									</th>
								</webwork:if>
							</webwork:iterator>
		                </tr>

		                <%/*counter used to alternate background row colors*/%>
						<webwork:bean name="'webwork.util.Counter'" id="rowCount">
							<webwork:param name="'wrap'" value="true"/>
							<webwork:param name="'last'" value="2"/>
						</webwork:bean>

						<%/*Row iterator will iterate through the formated rows*/%>
							<webwork:iterator value="rowIterator">

								<%/*set the background colors.  Used in 0.95 version
								   * I haven't looked to see if there is a cleaner way
								   * but there must be
								   */%>
								<tr
									<webwork:if test="@rowCount/next == 1">
										bgcolor="#EEEEFF"
									</webwork:if>
									<webwork:if test = "@rowCount/next == 0"/>
									<webwork:if test = "@rowCount/next == 2">
										bgcolor="#FFFFFF"
									</webwork:if>
								>
								<%/*show the actual cell contents.  It is generated by the renderer for the columns*/%>
								<webwork:iterator>
									<td><webwork:property value="." escape="false"/></td>
								</webwork:iterator>
								</tr>
							</webwork:iterator>
						</table>
					</td>
				</tr>
			</table>
		</p>
	</webwork:if>
	<webwork:else>
		<center>
			<table border="1">
				<tr><th><font color="red">ERROR</font></th></tr>
				<tr><td>no model was available</td></tr>
			</table>
		</center>
	</webwork:else>
</webwork:if>
<webwork:else>
	this page can not be loaded directly
</webwork:else>
