⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rltninquiry.jsp

📁 《Developing Applications with Java and UML》一书的源代码。
💻 JSP
字号:
<!-- This JSP will display the contents of the customerValue bean    -->
<!-- This JSP also uses some features from the "struts" tag library  -->
<!-- in support of iterating through the returned address collection -->
<!--                                                                 -->
<!--         Property of Jackson-Reed, Inc. www.jacksonreed.com      -->
<%@ page language="java" contentType="text/html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<jsp:useBean id="custVal" scope="request" class="com.jacksonreed.CustomerValue" />
<bean:define id="custOther" name="custVal"/>
<HTML>
<HEAD>
<TITLE>Remulak Relationship Inquiry</TITLE>
</HEAD>
<BODY >
<form action="rltnUpdate" method="get">
<P><FONT size=6>Remulak Relationship Inquiry</FONT></P>
<table border="1" width="20%"  >
  <tr>
    <th align="center">
      Customer Number
    </th>
  </tr>
  <tr>
    <td align="left" bgColor="aqua">
      <%= custVal.getCustomerNumber() %>
    </td>
  </tr>
</table>
<p><p>
<table border="1" width="60%"  >
  <tr>
    <th align="center" width="10%">
      Prefix
    </th>
    <th align="center" width="25%">
      First Name
    </th>
    <th align="center" width="2%">
      MI
    </th>
    <th align="center" width="25%">
      Last Name
    </th>
    <th align="center" width="10%">
      Suffix
    </th>
  </tr>
  <tr>
    <td align="left" width="10%" bgColor="aqua">
      <jsp:getProperty name="custVal" property="prefix"/>
    </td>
    <td align="left" width="25%" bgColor="aqua">
      <%= custVal.getFirstName() %>
    </td>
    <td align="left" width="2%" bgColor="aqua">
      <%= custVal.getMiddleInitial() %>
    </td>
    <td align="left" width="25%" bgColor="aqua">
      <%= custVal.getLastName() %>
    </td>
    <td align="left" width="10%" bgColor="aqua">
      <%= custVal.getSuffix() %>
    </td>
  </tr>
</table>
<p><p>
<table border="1" width="60%"  >
  <tr>
    <th align="center" width="25%">
      Phone1
    </th>
    <th align="center" width="25%">
      Phone2
    </th>
    <th align="center" width="25%">
      E-Mail
    </th>
  </tr>
  <tr>
    <td align="left" width="25%" bgColor="aqua">
      <%= custVal.getPhone1() %>
    </td>
    <td align="left" width="25%" bgColor="aqua">
      <%= custVal.getPhone2() %>
    </td>
    <td align="left" width="25%" bgColor="aqua">
      <%= custVal.getEMail() %>
    </td>
  </tr>
</table>
<!-- Buttons for Customer -->
<table border="0" width="30%"  >
  <tr>
    <th align="left" width="33%">
      <INPUT type=submit value="Edit Customer" name=action >
    </th>
    <th align="left" width="33%">
      <INPUT type=submit value="Delete Customer" name=action >
    </th>
    <th align="left" width="33%">
<!---Implemented in EJB version--->
<!---<INPUT type=submit value="Add Address" name=action>--->
    </th>
  </tr>
</table>
<!-- This is the Struts iterator which will cycle over our RoleValue -->
<logic:iterate id="role" name="custOther" property="roleValue">
<!-- Role Name -->
<hr>
<table border="1" width="20%"  >
  <tr>
    <th align="center">
      Role Name
    </th>
  </tr>
  <tr>
    <td align="left" bgColor="aqua">
      <bean:write name="role" property="roleName" filter="true"/>
    </td>
  </tr>
</table>
<!-- Address Lines -->
<table border="1" width="60%"  >
  <tr>
    <th align="center" width="10%">
      Address
    </th>
  </tr>
  <tr>
    <td align="left" width="60%" bgColor="aqua">
      <bean:write name="role" property="addressValue.addressLine1" filter="true"/>
      <br>
      <bean:write name="role" property="addressValue.addressLine2" filter="true"/>
      <br>
      <bean:write name="role" property="addressValue.addressLine3" filter="true"/>
    </td>
  </tr>
</table>
<!-- City, State, ZIP -->
<table border="1" width="60%"  >
  <tr>
    <th align="center" width="25%">
      City
    </th>
    <th align="center" width="25%">
      State
    </th>
    <th align="center" width="25%">
      Zip
    </th>
  </tr>
  <tr>
    <td align="left" width="25%" bgColor="aqua">
      <bean:write name="role" property="addressValue.city" filter="true"/>
    </td>
    <td align="left" width="25%" bgColor="aqua">
      <bean:write name="role" property="addressValue.state" filter="true"/>
    </td>
    <td align="left" width="25%" bgColor="aqua">
      <bean:write name="role" property="addressValue.zip" filter="true"/>
    </td>
  </tr>
</table>
<!-- Buttons for Address -->
<table border="0" width="30%"  >
  <tr>
    <th align="left" width="33%">
      <a href="rltnUpdate?action=Edit+Address&roleId=<bean:write name="role" property="roleId" filter="true"/>&addressId=<bean:write name="role" property="addressValue.addressId" filter="true"/>&customerNumber=<%= custVal.getCustomerNumber() %>&customerId=<%= custVal.getCustomerId() %>"><img src=images/edit.gif border="0" alt="Update Role or Address">
      </a>
    </th>
    <th align="left" width="33%">
      <a href="rltnUpdate?action=Delete+Address&roleId=<bean:write name="role" property="roleId" filter="true"/>&addressId=<bean:write name="role" property="addressValue.addressId" filter="true"/>&customerNumber=<%= custVal.getCustomerNumber() %>&customerId=<%= custVal.getCustomerId() %>"><img src=images/delete.gif border="0" alt="Delete Role and Address">
      </a>
    </th>
    <th align="left" width="33%">
      &nbsp
    </th>
  </tr>
</table>
</logic:iterate>
<INPUT type="hidden" name="customerNumber" value='<%= custVal.getCustomerNumber() %>' >
<INPUT type="hidden" name="customerId" value='<%= custVal.getCustomerId() %>' >
</form>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -