<html>
<%@ page errorPage="Error.jsp" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-1.0.2" prefix="bean" %>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/utiltaglib.tld" prefix="util" %>

<%-- Include common page header with navigation bar and "select" Topic tab --%>
<c:set var="tab" value="topic"/>
<%@ include file="header.jsp" %>

<table BORDER="1">
<tr>
   <td><b><bean:message key="topic.id"/></b></td>
   <td><b><bean:message key="topic.area"/></b></td>
   <td><b><bean:message key="topic.description"/></b></td>
</tr>
<%-- Use JSTL to loop through all Topics stored in HTTP request --%>
   <c:forEach items="${topics}" var="topic" varStatus="status">
   <tr>
      <td><a href="<bean:message key="navigation.topic.update"/><c:out value="${topic.topicID}"/>">
          <c:out value="${topic.topicID}"/></a></td>
      <td><c:out value="${areas[status.index].areaDesc}"/></td>
      <td><c:out value="${topic.topicDesc}"/></td>
   </tr>
   </c:forEach>
</table>

<br>
<b><a href="<bean:message key="navigation.topic.create"/>">
   <bean:message key="topic.link.create"/></a></b>

<%-- Include common page footer with Last Modified timestamp --%>
<%@ include file="footer.jsp" %>
</html>

