43 | | <table> |
44 | | <thead title="${zahlaviTip}"> |
45 | | <tr> |
46 | | <c:forEach var="zahlavi" items="${tabulka.zahlavi}"> |
47 | | <td> |
48 | | <!-- <lokalizace> --> |
49 | | <c:if test="${tabulka.lokalizovat}"> |
50 | | <fmt:message key="${zahlavi}" var="zahlavi"/> |
51 | | </c:if> |
52 | | <!-- </lokalizace> --> |
53 | | <c:out value="${zahlavi}"/> |
54 | | </td> |
55 | | </c:forEach> |
56 | | </tr> |
57 | | </thead> |
58 | | <tbody> |
59 | | <c:forEach var="radek" items="${tabulka.hodnoty}"> |
60 | | <tr> |
61 | | <c:forEach var="bunka" items="${radek}"> |
62 | | <!-- <formátováníPodleDatovýchTypů> --> |
63 | | <c:choose> |
64 | | <c:when test="${bunka.class == 'class java.sql.Timestamp'}"> |
65 | | <td> |
66 | | <fmt:formatDate value="${bunka}" pattern="dd.MM.yyyy HH:mm:ss"/> |
67 | | <!-- uvnitř vzoru je nedělitelná mezera --> |
68 | | </td> |
69 | | </c:when> |
70 | | <c:when test="${bunka.class == 'class java.sql.Date'}"> |
71 | | <td> |
72 | | <fmt:formatDate value="${bunka}" pattern="dd.MM.yyyy"/> |
73 | | </td> |
74 | | </c:when> |
75 | | <c:when test="${bunka.class == 'class java.lang.Integer' || bunka.class == 'class java.math.BigDecimal'}"> |
76 | | <td class="cislo"> |
77 | | <fmt:formatNumber value="${bunka}" pattern="###,###.###"/> |
78 | | </td> |
79 | | </c:when> |
80 | | <c:when test="${bunka.class == 'class java.lang.Boolean'}"> |
81 | | <td> |
82 | | <c:choose> |
83 | | <c:when test="${bunka}"> |
84 | | <fmt:message key="boolean.pravda.tip" var="pravda"/> |
85 | | <abbr title="${pravda}"><fmt:message key="boolean.pravda"/></abbr> |
86 | | </c:when> |
87 | | <c:otherwise> |
88 | | <fmt:message key="boolean.nepravda.tip" var="nepravda"/> |
89 | | <abbr title="${nepravda}"><fmt:message key="boolean.nepravda"/></abbr> |
90 | | </c:otherwise> |
91 | | </c:choose> |
92 | | </td> |
93 | | </c:when> |
94 | | <c:otherwise> |
95 | | <td> |
96 | | <c:out value="${bunka}" /> |
97 | | </td> |
98 | | </c:otherwise> |
99 | | </c:choose> |
100 | | <!-- </formátováníPodleDatovýchTypů> --> |
101 | | </c:forEach> |
102 | | </tr> |
103 | | </c:forEach> |
104 | | </tbody> |
105 | | </table> |
| 43 | <c:choose> |
| 44 | <c:when test="${fn:length(tabulka.zahlavi) == 1 && tabulka.zahlavi[0] == 'pouze_xml'}"> |
| 45 | <!-- <XML tabulka> --> |
| 46 | <pre><c:out value="${tabulka.hodnoty[0][0]}" /></pre> |
| 47 | <!-- </XML tabulka> --> |
| 48 | </c:when> |
| 49 | <c:otherwise> |
| 50 | <!-- <bežná tabulka> --> |
| 51 | <table> |
| 52 | <thead title="${zahlaviTip}"> |
| 53 | <tr> |
| 54 | <c:forEach var="zahlavi" items="${tabulka.zahlavi}"> |
| 55 | <td> |
| 56 | <!-- <lokalizace> --> |
| 57 | <c:if test="${tabulka.lokalizovat}"> |
| 58 | <fmt:message key="${zahlavi}" var="zahlavi"/> |
| 59 | </c:if> |
| 60 | <!-- </lokalizace> --> |
| 61 | <c:out value="${zahlavi}"/> |
| 62 | </td> |
| 63 | </c:forEach> |
| 64 | </tr> |
| 65 | </thead> |
| 66 | <tbody> |
| 67 | <c:forEach var="radek" items="${tabulka.hodnoty}"> |
| 68 | <tr> |
| 69 | <c:forEach var="bunka" items="${radek}"> |
| 70 | <!-- <formátováníPodleDatovýchTypů> --> |
| 71 | <c:choose> |
| 72 | <c:when test="${bunka.class == 'class java.sql.Timestamp'}"> |
| 73 | <td> |
| 74 | <fmt:formatDate value="${bunka}" pattern="dd.MM.yyyy HH:mm:ss"/> |
| 75 | <!-- uvnitř vzoru je nedělitelná mezera --> |
| 76 | </td> |
| 77 | </c:when> |
| 78 | <c:when test="${bunka.class == 'class java.sql.Date'}"> |
| 79 | <td> |
| 80 | <fmt:formatDate value="${bunka}" pattern="dd.MM.yyyy"/> |
| 81 | </td> |
| 82 | </c:when> |
| 83 | <c:when test="${bunka.class == 'class java.lang.Integer' || bunka.class == 'class java.math.BigDecimal'}"> |
| 84 | <td class="cislo"> |
| 85 | <fmt:formatNumber value="${bunka}" pattern="###,###.###"/> |
| 86 | </td> |
| 87 | </c:when> |
| 88 | <c:when test="${bunka.class == 'class java.lang.Boolean'}"> |
| 89 | <td> |
| 90 | <c:choose> |
| 91 | <c:when test="${bunka}"> |
| 92 | <fmt:message key="boolean.pravda.tip" var="pravda"/> |
| 93 | <abbr title="${pravda}"><fmt:message key="boolean.pravda"/></abbr> |
| 94 | </c:when> |
| 95 | <c:otherwise> |
| 96 | <fmt:message key="boolean.nepravda.tip" var="nepravda"/> |
| 97 | <abbr title="${nepravda}"><fmt:message key="boolean.nepravda"/></abbr> |
| 98 | </c:otherwise> |
| 99 | </c:choose> |
| 100 | </td> |
| 101 | </c:when> |
| 102 | <c:otherwise> |
| 103 | <td> |
| 104 | <c:out value="${bunka}" /> |
| 105 | </td> |
| 106 | </c:otherwise> |
| 107 | </c:choose> |
| 108 | <!-- </formátováníPodleDatovýchTypů> --> |
| 109 | </c:forEach> |
| 110 | </tr> |
| 111 | </c:forEach> |
| 112 | </tbody> |
| 113 | </table> |
| 114 | <!-- </bežná tabulka> --> |
| 115 | </c:otherwise> |
| 116 | </c:choose> |