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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20