<html>
<%@ page errorPage="Error.jsp" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html-1.0.2" prefix="html" %>
<%@ 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" %>

<%-- Struts form using Sruts HTML tags --%>
<html:form action="/topic.do?action=save">
<table>
<%-- Only display ID if ID is not 0 (meaning object does exist) --%>
<c:if test="${TopicForm.id != 0}">
   <tr valign=TOP>
      <td align=LEFT><b><bean:message key="topic.id"/></b></td>
      <td align=LEFT><bean:write name="TopicForm" property="id"/>
                     <html:hidden property="id"/></td>
   </tr>
</c:if>
<tr valign=TOP>
   <td align=LEFT><b><bean:message key="topic.area"/></b></td>
   <td align=LEFT><bean:define name="TopicForm" id="areas" property="areas"/>
   <html:select property="areaID">
        <html:options collection="areas" property="areaID" labelProperty="areaDesc"/>
   </html:select>
   </td>
</tr>
<tr valign=TOP>
   <td align=LEFT><b><bean:message key="topic.description"/></b></td>
   <td align=LEFT><html:text property="topicDesc" size="50" maxlength="100"/></td>
</tr>
</table>
<html:submit><bean:message key="button.save"/></html:submit>
<html:reset><bean:message key="button.reset"/></html:reset>
</html:form>

<c:if test="${param.action != 'create'}">
   <br><b><a href="<bean:message key="navigation.topic.create"/>">
   <bean:message key="topic.link.create"/></a></b>
</c:if>

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

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

