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

<%-- JSP page setup --%>
<%! static String pageTitle = "Address List"; %>
<%@ page
info = "Generate a filtering, sortable table of addresses"
language = "java"
session = "true"
import="com.bullseyecomputing.beans.AddressListBean, java.util.*"
%>
<%@ include file = "include/pageHeader.jsp" %>
<body bgcolor="#f7f7f7" onload="document.search.filter.focus();">
<table class="data" cellpadding=0 cellspacing=2>
<colgroup>
<col> <!-- Name -->
<col> <!-- Street -->
<col size=16em> <!-- City -->
<col size=2em> <!-- State -->
<col size=5em> <!-- Zipcode -->
<col size=10em> <!-- Phone -->
</colgroup>
<tr class="header">
<form method="get" action="getData" name="search">
<td colspan=2 class="title">Address List</td>
<td colspan=4 align="right"><b class="label">Search:</b>
<input type="text" name="filter" maxlength=30 style="width: 140pt"/></td>
</form>
</tr>
<tr>
<th><a href="/getList?orderby=name&">Name</a></th>
<th>Street</th>
<th><a href="/getList?orderby=city&">City</a></th>
<th><a href="/getList?orderby=state&">ST</a></th>
<th><a href="/getList?orderby=zipcode&">Zip</a></th>
<th>Phone</th>
</tr>
<%
List addresslist = (List) session.getAttribute("resultList");
Iterator address = addresslist.iterator();
int row = 0;
AddressListBean addr;
while(address.hasNext()) {
addr = (AddressListBean) address.next();
%> <tr class="<%=(row++ % 2 == 1) ? "dark" : "light"%>">
<td><a href="/getDetail?id=<%=addr.getIdNumber()%>&"><%=addr.getName()%></a></td>
<td><%=addr.getStreet()%></td>
<td><a href="/getList?filter=state:<%=addr.getState()%>:city:<%=addr.getCity()%>&"><%=addr.getCity()%></a></td>
<td><a href="/getList?filter=state:<%=addr.getState()%>&"><%=addr.getState()%></a></td>
<td><%=addr.getZipcode()%></td>
<td><%=addr.getPlus4()%></td>
</tr>
<%
}
// Release the resultList object
session.removeAttribute("resultList");
%> <tr class="status">
<td colspan=6>
<span class="left">&nbsp;Page x of y</span>
<span class="right">
<input class="status" type="button" value="prev">
<input class="status" type="button" value="next">
</span>
</td>
</tr>
</table>
</body>
</html>