<%@ include file="/WEB-INF/jsp/include.jsp" %>

<html>
<head><title>Nunaliit-server Proxy View Table</title></head>
<body>
	<%@ include file="/WEB-INF/jsp/menu.jsp" %>
	
	<h1>Nunaliit-server Proxy View Table</h1>
	<c:if test='${null == cachedTable}'>
		<p>ERROR! Can not find requested table</p>
	</c:if>									
	<c:if test='${null != cachedTable}'>
		<c:if test='${null == cachedTable.table}'>
			<p>ERROR! Content is not available</p>
		</c:if>									
		<c:if test='${null != cachedTable.table}'>
			<table>
				<tr>
					<c:forEach items="${columnNames}" var="columnName">
						<th><c:out value="${columnName}"/></th>
					</c:forEach>
				</tr>
				<c:forEach items="${cachedTable.table.rows}" var="row">
					<tr>
						<c:forEach items="${columnNames}" var="columnName">
							<td><c:out value="${row.columnMap[columnName].value}"/></td>
						</c:forEach>
					</tr>
				</c:forEach>
			</table>
		</c:if>									
	</c:if>									
</body>
</html>