java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp
author František Kučera <franta-hg@frantovo.cz>
Sun Mar 07 21:19:35 2010 +0100 (2010-03-07)
changeset 57 7162ed62c9ab
parent 42 77c8271add7d
child 73 34c7eb5f2fae
permissions -rw-r--r--
Lepší chybová hláška při špatně vyplněném formuláři pro přidání podniku.
franta-hg@40
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@40
     2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
franta-hg@40
     3
	  xmlns:c="http://java.sun.com/jsp/jstl/core"
franta-hg@40
     4
	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
franta-hg@40
     5
	  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
franta-hg@40
     6
	  version="2.0">
franta-hg@40
     7
franta-hg@40
     8
    <jsp:useBean id="podnik" class="cz.frantovo.nekurak.dto.Podnik" scope="request"/>
franta-hg@40
     9
    <jsp:useBean id="pridatPodnik" class="cz.frantovo.nekurak.web.PridatPodnik" scope="request"/>
franta-hg@40
    10
franta-hg@42
    11
    <h1><fmt:message key="pridatPodnik.nadpis"/></h1>
franta-hg@40
    12
franta-hg@40
    13
    <c:choose>
franta-hg@40
    14
	<c:when test="${param.akcePridat == 'pridej'}">
franta-hg@57
    15
	    <c:catch var="pridatPodnikChyba">
franta-hg@57
    16
		<jsp:setProperty name="podnik" property="*"/>
franta-hg@57
    17
		<jsp:setProperty name="pridatPodnik" property="podnik" value="${podnik}"/>
franta-hg@57
    18
		<c:set var="pridatPodnikOK" value="${pridatPodnik.pridano}"/>
franta-hg@57
    19
	    </c:catch>
franta-hg@57
    20
	    <c:choose>
franta-hg@57
    21
		<c:when test="${pridatPodnikChyba == null}">
franta-hg@57
    22
		    <p><fmt:message key="pridatPodnik.bylPridan"/></p>
franta-hg@57
    23
		</c:when>
franta-hg@57
    24
		<c:otherwise>
franta-hg@57
    25
		    <p class="chybovaHlaska"><fmt:message key="pridatPodnik.nebylPridan"/></p>
franta-hg@57
    26
		</c:otherwise>
franta-hg@57
    27
	    </c:choose>
franta-hg@40
    28
	</c:when>
franta-hg@40
    29
	<c:otherwise>
franta-hg@40
    30
	    <form method="post" action="?akce=pridatPodnik&amp;amp;akcePridat=pridej">
franta-hg@40
    31
		<fieldset>
franta-hg@42
    32
		    <label><fmt:message key="dto.podnik.nazev"/>: <input type="text" name="nazev" maxlength="255"/></label><br/>
franta-hg@42
    33
		    <label><fmt:message key="dto.podnik.popis"/>: <input type="text" name="popis" maxlength="255"/></label><br/>
franta-hg@57
    34
			<fmt:message key="dto.podnik.url.tip" var="urlTip"/>
franta-hg@42
    35
		    <label title="${urlTip}"><fmt:message key="dto.podnik.url"/>: <input type="text" name="url" maxlength="255"/></label><br/>
franta-hg@42
    36
		    <label><fmt:message key="dto.podnik.ulice"/>: <input type="text" name="ulice" maxlength="64"/></label><br/>
franta-hg@57
    37
			<fmt:message key="dto.podnik.cisloPopisne.tip" var="cisloPopisneTip"/>
franta-hg@42
    38
		    <label title="${cisloPopisneTip}"><fmt:message key="dto.podnik.cisloPopisne"/>: <input type="text" name="cisloPopisne" maxlength="5"/></label><br/>
franta-hg@42
    39
		    <label><fmt:message key="dto.podnik.mesto"/>: <input type="text" name="mesto" maxlength="64"/></label><br/>
franta-hg@42
    40
		    <button value="submit"><fmt:message key="pridatPodnik.tlacitko"/></button>
franta-hg@40
    41
		</fieldset>
franta-hg@40
    42
	    </form>
franta-hg@40
    43
	</c:otherwise>
franta-hg@40
    44
    </c:choose>
franta-hg@40
    45
franta-hg@40
    46
franta-hg@40
    47
franta-hg@40
    48
franta-hg@40
    49
</jsp:root>