JSP Addressbook app for VIP Express (circa Jun 2002)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

67 lines
2.2 KiB

  1. <%-- JSP page setup --%>
  2. <%! static String pageTitle = "Address List"; %>
  3. <%@ page
  4. info = "Generate a filtering, sortable table of addresses"
  5. language = "java"
  6. session = "true"
  7. import="com.bullseyecomputing.beans.AddressListBean, java.util.*"
  8. %>
  9. <%@ include file = "include/pageHeader.jsp" %>
  10. <body bgcolor="#f7f7f7" onload="document.search.filter.focus();">
  11. <table class="data" cellpadding=0 cellspacing=2>
  12. <colgroup>
  13. <col> <!-- Name -->
  14. <col> <!-- Street -->
  15. <col size=16em> <!-- City -->
  16. <col size=2em> <!-- State -->
  17. <col size=5em> <!-- Zipcode -->
  18. <col size=10em> <!-- Phone -->
  19. </colgroup>
  20. <tr class="header">
  21. <form method="get" action="getData" name="search">
  22. <td colspan=2 class="title">Address List</td>
  23. <td colspan=4 align="right"><b class="label">Search:</b>
  24. <input type="text" name="filter" maxlength=30 style="width: 140pt"/></td>
  25. </form>
  26. </tr>
  27. <tr>
  28. <th><a href="/getList?orderby=name&">Name</a></th>
  29. <th>Street</th>
  30. <th><a href="/getList?orderby=city&">City</a></th>
  31. <th><a href="/getList?orderby=state&">ST</a></th>
  32. <th><a href="/getList?orderby=zipcode&">Zip</a></th>
  33. <th>Phone</th>
  34. </tr>
  35. <%
  36. List addresslist = (List) session.getAttribute("resultList");
  37. Iterator address = addresslist.iterator();
  38. int row = 0;
  39. AddressListBean addr;
  40. while(address.hasNext()) {
  41. addr = (AddressListBean) address.next();
  42. %> <tr class="<%=(row++ % 2 == 1) ? "dark" : "light"%>">
  43. <td><a href="/getDetail?id=<%=addr.getIdNumber()%>&"><%=addr.getName()%></a></td>
  44. <td><%=addr.getStreet()%></td>
  45. <td><a href="/getList?filter=state:<%=addr.getState()%>:city:<%=addr.getCity()%>&"><%=addr.getCity()%></a></td>
  46. <td><a href="/getList?filter=state:<%=addr.getState()%>&"><%=addr.getState()%></a></td>
  47. <td><%=addr.getZipcode()%></td>
  48. <td><%=addr.getPlus4()%></td>
  49. </tr>
  50. <%
  51. }
  52. // Release the resultList object
  53. session.removeAttribute("resultList");
  54. %> <tr class="status">
  55. <td colspan=6>
  56. <span class="left">&nbsp;Page x of y</span>
  57. <span class="right">
  58. <input class="status" type="button" value="prev">
  59. <input class="status" type="button" value="next">
  60. </span>
  61. </td>
  62. </tr>
  63. </table>
  64. </body>
  65. </html>