/[projects]/android/TrainInfoService/WebContent/ViewDepartures.jsp
ViewVC logotype

Annotation of /android/TrainInfoService/WebContent/ViewDepartures.jsp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 307 - (hide annotations) (download)
Thu Sep 10 18:11:53 2009 UTC (14 years, 8 months ago) by torben
File size: 1732 byte(s)
Finish new bane.dk screen-scraper
1 torben 307 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2     pageEncoding="ISO-8859-1"%>
3     <%@ page import="java.util.List" %>
4     <%@ page import="dk.thoerup.traininfoservice.banedk.DepartureBean" %>
5     <%
6     String stationname = (String) request.getAttribute("stationname");
7     List<DepartureBean> departurebeans = (List<DepartureBean>) request.getAttribute("departurebeans");
8     int stationID = (Integer) request.getAttribute("stationID");
9     boolean advanced = false;
10     String advStr = request.getParameter("advanced");
11    
12    
13     if (advStr != null) {
14     advanced = Boolean.parseBoolean(advStr);
15     }
16    
17    
18     %>
19    
20     <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
21     <html>
22     <head>
23     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
24     <title>Train info : <%= stationname %></title>
25     </head>
26     <body>
27    
28     <h2>Station: <%= stationname %></h2>
29     <a href="DepartureServlet?station=<%=stationID%>&format=html&advanced=<%= !advanced %>">Switch view</a><br>
30     <table border="1">
31     <tr>
32     <th>Time</th>
33     <th>Updated</th>
34     <%= advanced ? "<th>Trainnumber</th>" : "" %>
35     <th>Destination</th>
36     <%= advanced ? "<th>Origin</th><th>Location</th>" : "" %>
37     <th>Status</th>
38     <th>Note</th>
39     </tr>
40     <% for(DepartureBean dep : departurebeans) { %>
41     <tr>
42     <td><%= dep.getTime() %></td>
43     <td><%= dep.getUpdated() %></td>
44     <%= advanced ? "<td>" + dep.getTrainNumber() + "</td>" : "" %>
45     <td><%= dep.getDestination() %></td>
46     <%= advanced ? "<td>" + dep.getOrigin() + "</td>" : "" %>
47     <%= advanced ? "<td>" + dep.getLocation() + "</td>" : "" %>
48     <td><%= dep.getStatus() %></td>
49     <td><%= dep.getNote() %></td>
50     </tr>
51     <% } %>
52    
53     </table>
54    
55    
56     </body>
57     </html>

  ViewVC Help
Powered by ViewVC 1.1.20