author | František Kučera <franta-hg@frantovo.cz> |
Thu, 18 Feb 2010 01:22:22 +0100 | |
changeset 30 | 705871ca12e9 |
parent 26 | fc3e84d87e01 |
child 31 | bae2ead150f7 |
permissions | -rw-r--r-- |
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@30 | 11 |
<fmt:setBundle basename="cz.frantovo.nekurak.preklady" scope="application"/> |
franta-hg@30 | 12 |
|
franta-hg@3 | 13 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
franta-hg@3 | 14 |
<head> |
franta-hg@30 | 15 |
<title><fmt:message key="nazev"/></title> |
franta-hg@26 | 16 |
<link href="styl.css" type="text/css" rel="StyleSheet"/> |
franta-hg@3 | 17 |
</head> |
franta-hg@3 | 18 |
<body> |
franta-hg@30 | 19 |
<h1><fmt:message key="nazev"/></h1> |
franta-hg@30 | 20 |
<p><fmt:message key="popis"/></p> |
franta-hg@8 | 21 |
|
franta-hg@10 | 22 |
|
franta-hg@10 | 23 |
<!-- jednoduchá podmínka --> |
franta-hg@10 | 24 |
<c:if test="${param.akce == 'informace'}"> |
franta-hg@10 | 25 |
<p>Vypíšeme nějaké informace.</p> |
franta-hg@10 | 26 |
</c:if> |
franta-hg@10 | 27 |
|
franta-hg@10 | 28 |
<!-- složitější větvení --> |
franta-hg@10 | 29 |
<c:choose> |
franta-hg@10 | 30 |
<!-- if --> |
franta-hg@10 | 31 |
<c:when test="${param.akce == 'seznam'}"> |
franta-hg@26 | 32 |
<p>Vypíšeme seznam podniků:</p> |
franta-hg@10 | 33 |
<!-- Vytvoříme si instanci JavaBeany --> |
franta-hg@14 | 34 |
<jsp:useBean id="podnikyWeb" class="cz.frantovo.nekurak.web.PodnikyWeb" scope="request"/> |
franta-hg@26 | 35 |
<table> |
franta-hg@26 | 36 |
<thead> |
franta-hg@26 | 37 |
<tr> |
franta-hg@26 | 38 |
<td>Číslo</td> |
franta-hg@26 | 39 |
<td>Název</td> |
franta-hg@26 | 40 |
</tr> |
franta-hg@26 | 41 |
</thead> |
franta-hg@26 | 42 |
<tbody> |
franta-hg@26 | 43 |
<c:forEach var="p" items="${podnikyWeb.podniky}"> |
franta-hg@26 | 44 |
<tr> |
franta-hg@26 | 45 |
<td><c:out value="${p.id}"/></td> |
franta-hg@26 | 46 |
<td><c:out value="${p.nazev}"/></td> |
franta-hg@26 | 47 |
</tr> |
franta-hg@26 | 48 |
</c:forEach> |
franta-hg@26 | 49 |
</tbody> |
franta-hg@26 | 50 |
</table> |
franta-hg@10 | 51 |
</c:when> |
franta-hg@10 | 52 |
<!-- else if --> |
franta-hg@10 | 53 |
<c:when test="${param.akce == 'podrobnosti'}"> |
franta-hg@10 | 54 |
<p>Vypíšeme podrobnosti.</p> |
franta-hg@10 | 55 |
</c:when> |
franta-hg@10 | 56 |
<!-- else --> |
franta-hg@10 | 57 |
<c:otherwise> |
franta-hg@10 | 58 |
<p>Zobrazíme úvodní stránku.</p> |
franta-hg@10 | 59 |
</c:otherwise> |
franta-hg@10 | 60 |
</c:choose> |
franta-hg@10 | 61 |
|
franta-hg@16 | 62 |
<!-- vložíme si obsah jiného souboru. |
franta-hg@16 | 63 |
Obsah adresáře WEB-INF není přímo dostupný uživateli --> |
franta-hg@8 | 64 |
<jsp:include page="WEB-INF/casti/paticka.jsp"> |
franta-hg@8 | 65 |
<jsp:param name="rok" value="2010" /> |
franta-hg@8 | 66 |
</jsp:include> |
franta-hg@3 | 67 |
</body> |
franta-hg@3 | 68 |
</html> |
franta-hg@3 | 69 |
|
franta-hg@3 | 70 |
</jsp:root> |