petForm.jsp
上传用户:dezhong
上传日期:2022-08-10
资源大小:167k
文件大小:1k
源码类别:

Java编程

开发平台:

Java

  1. <%@ include file="/WEB-INF/jsp/includes.jsp" %>
  2. <%@ include file="/WEB-INF/jsp/header.jsp" %>
  3. <h2><c:if test="${pet.new}">New </c:if>Pet</h2>
  4. <b>Owner:</b> ${pet.owner.firstName} ${pet.owner.lastName}
  5. <br/>
  6. <form:form modelAttribute="pet">
  7.   <table>
  8.     <tr>
  9.       <th>
  10.         Name: <form:errors path="name" cssClass="errors"/>
  11.         <br/>
  12.         <form:input path="name" size="30" maxlength="30"/>
  13.       </th>
  14.     </tr>
  15.     <tr>
  16.       <th>
  17.         Birth Date: <form:errors path="birthDate" cssClass="errors"/>
  18.         <br/>
  19.         <form:input path="birthDate" size="10" maxlength="10"/> (yyyy-mm-dd)
  20.       </th>
  21.     </tr>
  22.     <tr>
  23.       <th>
  24.         Type: <form:errors path="type" cssClass="errors"/>
  25.         <br/>
  26.         <form:select path="type" items="${types}"/>
  27.       </th>
  28.     </tr>
  29.     <tr>
  30.       <td>
  31.         <c:choose>
  32.           <c:when test="${pet.new}">
  33.             <p class="submit"><input type="submit" value="Add Pet"/></p>
  34.           </c:when>
  35.           <c:otherwise>
  36.             <p class="submit"><input type="submit" value="Update Pet"/></p>
  37.           </c:otherwise>
  38.         </c:choose>
  39.       </td>
  40.     </tr>
  41.   </table>
  42. </form:form>
  43. <%@ include file="/WEB-INF/jsp/footer.jsp" %>