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

Java编程

开发平台:

Java

  1. <%@ include file="/WEB-INF/jsp/includes.jsp" %>
  2. <%@ include file="/WEB-INF/jsp/header.jsp" %>
  3. <h2>Owner Information</h2>
  4.   <table>
  5.     <tr>
  6.       <th>Name</th>
  7.       <td><b>${owner.firstName} ${owner.lastName}</b></td>
  8.     </tr>
  9.     <tr>
  10.       <th>Address</th>
  11.       <td>${owner.address}</td>
  12.     </tr>
  13.     <tr>
  14.       <th>City</th>
  15.       <td>${owner.city}</td>
  16.     </tr>
  17.     <tr>
  18.       <th>Telephone </th>
  19.       <td>${owner.telephone}</td>
  20.     </tr>
  21.   </table>
  22.   <table class="table-buttons">
  23.     <tr>
  24.       <td colspan="2" align="center">
  25.         <form method="GET" action="<c:url value="/editOwner.do"/>">
  26.           <input type="hidden" name="ownerId" value="${owner.id}"/>
  27.           <p class="submit"><input type="submit" value="Edit Owner"/></p>
  28.         </form>
  29.       </td>
  30.       <td>
  31.         <form method="GET" action="<c:url value="/addPet.do"/>" name="formAddPet">
  32.           <input type="hidden" name="ownerId" value="${owner.id}"/>
  33.           <p class="submit"><input type="submit" value="Add New Pet"/></p>
  34.         </form>
  35.       </td>
  36.     </tr>
  37.   </table>
  38.   <h2>Pets and Visits</h2>
  39.   <c:forEach var="pet" items="${owner.pets}">
  40.     <table width="94%">
  41.       <tr>
  42.         <td valign="top">
  43.           <table>
  44.             <tr>
  45.               <th>Name</th>
  46.               <td><b>${pet.name}</b></td>
  47.             </tr>
  48.             <tr>
  49.               <th>Birth Date</th>
  50.               <td><fmt:formatDate value="${pet.birthDate}" pattern="yyyy-MM-dd"/></td>
  51.             </tr>
  52.             <tr>
  53.               <th>Type</th>
  54.               <td>${pet.type.name}</td>
  55.             </tr>
  56.           </table>
  57.         </td>
  58.         <td valign="top">
  59.           <table>
  60.             <tr>
  61.             <thead>
  62.               <th>Visit Date</th>
  63.               <th>Description</th>
  64.             </thead>
  65.             </tr>
  66.             <c:forEach var="visit" items="${pet.visits}">
  67.               <tr>
  68.                 <td><fmt:formatDate value="${visit.date}" pattern="yyyy-MM-dd"/></td>
  69.                 <td>${visit.description}</td>
  70.               </tr>
  71.             </c:forEach>
  72.           </table>
  73.         </td>
  74.       </tr>
  75.     </table>
  76.     <table class="table-buttons">
  77.       <tr>
  78.         <td>
  79.           <form method="GET" action="<c:url value="/editPet.do"/>" name="formEditPet${pet.id}">
  80.             <input type="hidden" name="petId" value="${pet.id}"/>
  81.             <p class="submit"><input type="submit" value="Edit Pet"/></p>
  82.           </form>
  83.         </td>
  84.         <td>
  85.           <form method="GET" action="<c:url value="/addVisit.do"/>" name="formVisitPet${pet.id}">
  86.             <input type="hidden" name="petId" value="${pet.id}"/>
  87.             <p class="submit"><input type="submit" value="Add Visit"/></p>
  88.           </form>
  89.         </td>
  90.       </tr>
  91.     </table>
  92.   </c:forEach>
  93.   
  94. <%@ include file="/WEB-INF/jsp/footer.jsp" %>