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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 586 - (hide annotations) (download)
Fri Feb 5 19:28:36 2010 UTC (14 years, 3 months ago) by torben
File size: 1862 byte(s)
This is a more correct way of reading request attributes
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 torben 585 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
6     <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt" %>
7 torben 307
8 torben 586 <c-rt:set var="advanced" value="${requestScope.advanced}"/> <!-- similar to request.getAttribute("advanced") -->
9     <c-rt:set var="stationname" value="${requestScope.stationname}"/>
10     <c-rt:set var="departurebeans" value="${requestScope.departurebeans}"/>
11     <c-rt:set var="stationID" value="${requestScope.stationID}"/>
12 torben 307
13 torben 586
14 torben 307 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
15     <html>
16     <head>
17     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
18 torben 585 <title>Train info : ${stationname}</title>
19 torben 307 </head>
20     <body>
21    
22 torben 585 <h2>Station: ${stationname} </h2>
23     <a href="DepartureServlet?station=${stationID}&format=html&advanced=${!advanced}">Switch view</a><br>
24 torben 307 <table border="1">
25     <tr>
26     <th>Time</th>
27     <th>Updated</th>
28 torben 585 <c-rt:if test="${advanced == true}">
29     <th>Trainnumber</th>
30     </c-rt:if>
31 torben 307 <th>Destination</th>
32 torben 585 <c-rt:if test="${advanced == true}">
33     <th>Origin</th>
34     <th>Location</th>
35     </c-rt:if>
36 torben 307 <th>Status</th>
37     <th>Note</th>
38     </tr>
39 torben 585
40     <c-rt:forEach var="dep" items="${departurebeans}">
41 torben 307 <tr>
42 torben 585 <td>${dep.time}</td>
43     <td>${dep.updatedString}</td>
44    
45     <c-rt:if test="${advanced == true}">
46     <td>${dep.trainNumber}</td>
47     </c-rt:if>
48    
49     <td>${dep.destination}</td>
50    
51     <c-rt:if test="${advanced == true}">
52     <td>${dep.origin}</td>
53     <td>${dep.location}</td>
54     </c-rt:if>
55    
56     <td>${ dep.status }</td>
57     <td>${ dep.note }</td>
58    
59 torben 307 </tr>
60 torben 585 </c-rt:forEach>
61    
62 torben 307
63     </table>
64    
65    
66     </body>
67     </html>

  ViewVC Help
Powered by ViewVC 1.1.20