java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp
author František Kučera <franta-hg@frantovo.cz>
Thu Feb 25 08:26:46 2010 +0100 (2010-02-25)
changeset 40 67d332d48562
child 41 2c3451cc396c
permissions -rw-r--r--
Zakládání podniků + HTTP autentizace.
     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>Přidání nového podniku</h1>
    12 
    13     <c:choose>
    14 	<c:when test="${param.akcePridat == 'pridej'}">
    15 	    <jsp:setProperty name="podnik" property="*"/>
    16 	    <jsp:setProperty name="pridatPodnik" property="podnik" value="${podnik}"/>
    17 	    
    18 	    <p>Název: ${pridatPodnik.podnik.nazev} / ${param.nazev}</p>
    19 	    <p>Popis: ${pridatPodnik.podnik.popis}</p>
    20 	    <p>URL: ${pridatPodnik.podnik.url}</p>
    21 	    <p>Ulice: ${pridatPodnik.podnik.ulice}</p>
    22 	    <p>č.p.: ${pridatPodnik.podnik.cisloPopisne}</p>
    23 	    <p>Město: ${pridatPodnik.podnik.mesto}</p>
    24 
    25 
    26 	    <c:if test="${pridatPodnik.pridano}">
    27 		<p>Podnik byl přidán.</p>
    28 	    </c:if>
    29 	</c:when>
    30 	<c:otherwise>
    31 	    <form method="post" action="?akce=pridatPodnik&amp;amp;akcePridat=pridej">
    32 		<fieldset>
    33 		    <label>Název: <input type="text" name="nazev" maxlength="255"/></label><br/>
    34 		    <label>Popis: <input type="text" name="popis" maxlength="255"/></label><br/>
    35 		    <label>URL: <input type="text" name="url" maxlength="255"/></label><br/>
    36 		    <label>Ulice: <input type="text" name="ulice" maxlength="64"/></label><br/>
    37 		    <label>č.p.: <input type="text" name="cisloPopisne" maxlength="5"/></label><br/>
    38 		    <label>Město: <input type="text" name="mesto" maxlength="64"/></label><br/>
    39 		    <button value="submit">Přidat podnik</button>
    40 		</fieldset>
    41 	    </form>
    42 	</c:otherwise>
    43     </c:choose>
    44 
    45 
    46 
    47 
    48 </jsp:root>