java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp
author František Kučera <franta-hg@frantovo.cz>
Mon, 24 May 2010 20:25:55 +0200
changeset 122 f6c7168be1b7
parent 73 34c7eb5f2fae
child 145 0efefbf5f8b6
permissions -rw-r--r--
Test: Geo – překlad na Loc formát.
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     3 	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     4 	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     5 	  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
     6 	  xmlns:nk="urn:jsptagdir:/WEB-INF/tags/nekurak"
     7 	  version="2.0">
     8 
     9     <jsp:useBean id="podnik" class="cz.frantovo.nekurak.dto.Podnik" scope="request"/>
    10     <jsp:useBean id="pridatPodnik" class="cz.frantovo.nekurak.web.PridatPodnik" scope="request"/>
    11 
    12     <fmt:message key="pridatPodnik.nadpis" var="titulekStranky"/>
    13     <nk:stranka titulek="${titulekStranky}">
    14 
    15 	<h1><c:out value="${titulekStranky}"/></h1>
    16 
    17 	<c:choose>
    18 	    <c:when test="${param.akcePridat == 'pridej'}">
    19 		<c:catch var="pridatPodnikChyba">
    20 		    <jsp:setProperty name="podnik" property="*"/>
    21 		    <jsp:setProperty name="pridatPodnik" property="podnik" value="${podnik}"/>
    22 		    <c:set var="pridatPodnikOK" value="${pridatPodnik.pridano}"/>
    23 		</c:catch>
    24 		<c:choose>
    25 		    <c:when test="${pridatPodnikChyba == null}">
    26 			<p><fmt:message key="pridatPodnik.bylPridan"/></p>
    27 		    </c:when>
    28 		    <c:otherwise>
    29 			<p class="chybovaHlaska"><fmt:message key="pridatPodnik.nebylPridan"/></p>
    30 		    </c:otherwise>
    31 		</c:choose>
    32 	    </c:when>
    33 	    <c:otherwise>
    34 		<form method="post" action="?akce=pridatPodnik&amp;amp;akcePridat=pridej">
    35 		    <fieldset>
    36 			<label><fmt:message key="dto.podnik.nazev"/>: <input type="text" name="nazev" maxlength="255"/></label><br/>
    37 			<label><fmt:message key="dto.podnik.popis"/>: <input type="text" name="popis" maxlength="255"/></label><br/>
    38 			    <fmt:message key="dto.podnik.url.tip" var="urlTip"/>
    39 			<label title="${urlTip}"><fmt:message key="dto.podnik.url"/>: <input type="text" name="url" maxlength="255"/></label><br/>
    40 			<label><fmt:message key="dto.podnik.ulice"/>: <input type="text" name="ulice" maxlength="64"/></label><br/>
    41 			    <fmt:message key="dto.podnik.cisloPopisne.tip" var="cisloPopisneTip"/>
    42 			<label title="${cisloPopisneTip}"><fmt:message key="dto.podnik.cisloPopisne"/>: <input type="text" name="cisloPopisne" maxlength="5"/></label><br/>
    43 			<label><fmt:message key="dto.podnik.mesto"/>: <input type="text" name="mesto" maxlength="64"/></label><br/>
    44 			<button value="submit"><fmt:message key="pridatPodnik.tlacitko"/></button>
    45 		    </fieldset>
    46 		</form>
    47 	    </c:otherwise>
    48 	</c:choose>
    49 
    50     </nk:stranka>
    51 
    52 </jsp:root>