java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp
author František Kučera <franta-hg@frantovo.cz>
Sun Mar 14 01:05:35 2010 +0100 (2010-03-14)
changeset 67 fa7e30dee3b3
parent 42 77c8271add7d
child 73 34c7eb5f2fae
permissions -rw-r--r--
Hibernate: jednoduché mapování podniků a fotek (1:N).
     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 	  version="2.0">
     7 
     8     <jsp:useBean id="podnik" class="cz.frantovo.nekurak.dto.Podnik" scope="request"/>
     9     <jsp:useBean id="pridatPodnik" class="cz.frantovo.nekurak.web.PridatPodnik" scope="request"/>
    10 
    11     <h1><fmt:message key="pridatPodnik.nadpis"/></h1>
    12 
    13     <c:choose>
    14 	<c:when test="${param.akcePridat == 'pridej'}">
    15 	    <c:catch var="pridatPodnikChyba">
    16 		<jsp:setProperty name="podnik" property="*"/>
    17 		<jsp:setProperty name="pridatPodnik" property="podnik" value="${podnik}"/>
    18 		<c:set var="pridatPodnikOK" value="${pridatPodnik.pridano}"/>
    19 	    </c:catch>
    20 	    <c:choose>
    21 		<c:when test="${pridatPodnikChyba == null}">
    22 		    <p><fmt:message key="pridatPodnik.bylPridan"/></p>
    23 		</c:when>
    24 		<c:otherwise>
    25 		    <p class="chybovaHlaska"><fmt:message key="pridatPodnik.nebylPridan"/></p>
    26 		</c:otherwise>
    27 	    </c:choose>
    28 	</c:when>
    29 	<c:otherwise>
    30 	    <form method="post" action="?akce=pridatPodnik&amp;amp;akcePridat=pridej">
    31 		<fieldset>
    32 		    <label><fmt:message key="dto.podnik.nazev"/>: <input type="text" name="nazev" maxlength="255"/></label><br/>
    33 		    <label><fmt:message key="dto.podnik.popis"/>: <input type="text" name="popis" maxlength="255"/></label><br/>
    34 			<fmt:message key="dto.podnik.url.tip" var="urlTip"/>
    35 		    <label title="${urlTip}"><fmt:message key="dto.podnik.url"/>: <input type="text" name="url" maxlength="255"/></label><br/>
    36 		    <label><fmt:message key="dto.podnik.ulice"/>: <input type="text" name="ulice" maxlength="64"/></label><br/>
    37 			<fmt:message key="dto.podnik.cisloPopisne.tip" var="cisloPopisneTip"/>
    38 		    <label title="${cisloPopisneTip}"><fmt:message key="dto.podnik.cisloPopisne"/>: <input type="text" name="cisloPopisne" maxlength="5"/></label><br/>
    39 		    <label><fmt:message key="dto.podnik.mesto"/>: <input type="text" name="mesto" maxlength="64"/></label><br/>
    40 		    <button value="submit"><fmt:message key="pridatPodnik.tlacitko"/></button>
    41 		</fieldset>
    42 	    </form>
    43 	</c:otherwise>
    44     </c:choose>
    45 
    46 
    47 
    48 
    49 </jsp:root>