franta-hg@3
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
franta-hg@10
|
2 |
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
|
franta-hg@10
|
3 |
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
franta-hg@30
|
4 |
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
|
franta-hg@10
|
5 |
version="2.0">
|
franta-hg@3
|
6 |
<jsp:directive.page contentType="application/xhtml+xml"/>
|
franta-hg@3
|
7 |
<jsp:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
franta-hg@3
|
8 |
doctype-root-element="html"
|
franta-hg@3
|
9 |
omit-xml-declaration="false"/>
|
franta-hg@3
|
10 |
|
franta-hg@31
|
11 |
<fmt:setLocale value="cs"/>
|
franta-hg@31
|
12 |
<c:if test="${param.jazyk == 'en'}">
|
franta-hg@31
|
13 |
<fmt:setLocale value="en"/>
|
franta-hg@31
|
14 |
</c:if>
|
franta-hg@30
|
15 |
<fmt:setBundle basename="cz.frantovo.nekurak.preklady" scope="application"/>
|
franta-hg@30
|
16 |
|
franta-hg@3
|
17 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
franta-hg@3
|
18 |
<head>
|
franta-hg@30
|
19 |
<title><fmt:message key="nazev"/></title>
|
franta-hg@26
|
20 |
<link href="styl.css" type="text/css" rel="StyleSheet"/>
|
franta-hg@3
|
21 |
</head>
|
franta-hg@3
|
22 |
<body>
|
franta-hg@30
|
23 |
<h1><fmt:message key="nazev"/></h1>
|
franta-hg@30
|
24 |
<p><fmt:message key="popis"/></p>
|
franta-hg@8
|
25 |
|
franta-hg@31
|
26 |
<p><fmt:formatNumber value="1234567890" pattern="###,###.###"/></p>
|
franta-hg@31
|
27 |
|
franta-hg@10
|
28 |
|
franta-hg@10
|
29 |
<!-- jednoduchá podmínka -->
|
franta-hg@10
|
30 |
<c:if test="${param.akce == 'informace'}">
|
franta-hg@10
|
31 |
<p>Vypíšeme nějaké informace.</p>
|
franta-hg@10
|
32 |
</c:if>
|
franta-hg@10
|
33 |
|
franta-hg@10
|
34 |
<!-- složitější větvení -->
|
franta-hg@10
|
35 |
<c:choose>
|
franta-hg@10
|
36 |
<!-- if -->
|
franta-hg@10
|
37 |
<c:when test="${param.akce == 'seznam'}">
|
franta-hg@26
|
38 |
<p>Vypíšeme seznam podniků:</p>
|
franta-hg@10
|
39 |
<!-- Vytvoříme si instanci JavaBeany -->
|
franta-hg@14
|
40 |
<jsp:useBean id="podnikyWeb" class="cz.frantovo.nekurak.web.PodnikyWeb" scope="request"/>
|
franta-hg@26
|
41 |
<table>
|
franta-hg@26
|
42 |
<thead>
|
franta-hg@26
|
43 |
<tr>
|
franta-hg@26
|
44 |
<td>Číslo</td>
|
franta-hg@26
|
45 |
<td>Název</td>
|
franta-hg@26
|
46 |
</tr>
|
franta-hg@26
|
47 |
</thead>
|
franta-hg@26
|
48 |
<tbody>
|
franta-hg@26
|
49 |
<c:forEach var="p" items="${podnikyWeb.podniky}">
|
franta-hg@26
|
50 |
<tr>
|
franta-hg@26
|
51 |
<td><c:out value="${p.id}"/></td>
|
franta-hg@26
|
52 |
<td><c:out value="${p.nazev}"/></td>
|
franta-hg@26
|
53 |
</tr>
|
franta-hg@26
|
54 |
</c:forEach>
|
franta-hg@26
|
55 |
</tbody>
|
franta-hg@26
|
56 |
</table>
|
franta-hg@10
|
57 |
</c:when>
|
franta-hg@10
|
58 |
<!-- else if -->
|
franta-hg@10
|
59 |
<c:when test="${param.akce == 'podrobnosti'}">
|
franta-hg@10
|
60 |
<p>Vypíšeme podrobnosti.</p>
|
franta-hg@10
|
61 |
</c:when>
|
franta-hg@10
|
62 |
<!-- else -->
|
franta-hg@10
|
63 |
<c:otherwise>
|
franta-hg@10
|
64 |
<p>Zobrazíme úvodní stránku.</p>
|
franta-hg@10
|
65 |
</c:otherwise>
|
franta-hg@10
|
66 |
</c:choose>
|
franta-hg@10
|
67 |
|
franta-hg@16
|
68 |
<!-- vložíme si obsah jiného souboru.
|
franta-hg@16
|
69 |
Obsah adresáře WEB-INF není přímo dostupný uživateli -->
|
franta-hg@8
|
70 |
<jsp:include page="WEB-INF/casti/paticka.jsp">
|
franta-hg@8
|
71 |
<jsp:param name="rok" value="2010" />
|
franta-hg@8
|
72 |
</jsp:include>
|
franta-hg@3
|
73 |
</body>
|
franta-hg@3
|
74 |
</html>
|
franta-hg@3
|
75 |
|
franta-hg@3
|
76 |
</jsp:root>
|