From: <fc...@us...> - 2007-02-12 11:26:27
|
Revision: 242 http://svn.sourceforge.net/openutils/?rev=242&view=rev Author: fcarone Date: 2007-02-12 03:26:24 -0800 (Mon, 12 Feb 2007) Log Message: ----------- nobind option added to select tag. Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-11 21:49:49 UTC (rev 241) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-12 11:26:24 UTC (rev 242) @@ -1,117 +1,185 @@ -<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:spring="http://www.springframework.org/tags" xmlns:c="http://java.sun.com/jsp/jstl/core" - xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:su="http://openutils.sourceforge.net/openutils-tags-commonslang" xmlns:elx="http://openutils.sourceforge.net/openutils-tags-elx" - xmlns:ou="http://openutils.sourceforge.net/openutils-tags-spring" xmlns:dao="http://openutils.sourceforge.net/openutils-tags-dao"> - - <jsp:directive.attribute name="path" required="true" /> - <jsp:directive.attribute name="name" required="false" /> - <jsp:directive.attribute name="collection" required="false" /> - <jsp:directive.attribute name="property" required="false" /> - <jsp:directive.attribute name="text" required="false" /> - <jsp:directive.attribute name="multiple" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="readonly" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="disabled" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="style" required="false" /> - <jsp:directive.attribute name="findall" required="false" /> - <jsp:directive.attribute name="addempty" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="bare" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="onchange" required="false" /> - <jsp:directive.attribute name="key" required="false" /> - <jsp:directive.attribute name="label" required="false" type="java.lang.String" /> - - - <c:if test="${empty(key)}"> - <c:set var="key">${path}</c:set> - </c:if> - - <c:choose> - <c:when test="${!empty(collection)}"> - <c:set var="backingList" value="${requestScope[collection]}" /> - </c:when> - <c:when test="${!empty(findall)}"> - <c:set var="backingList" value="${dao:findAll(pageContext, findall)}" /> - </c:when> - </c:choose> - - - <c:choose> - <c:when test="${empty(label)}"> - <c:set var="labelmsg"><fmt:message key="${key}" /></c:set> - </c:when> - <c:otherwise> - <c:set var="labelmsg">${label}</c:set> - </c:otherwise> - </c:choose> - - - <spring:bind path="${path}"> - <c:set var="divclass">formelement <c:if test="${!empty(status.errorMessage)}"> formelementerror</c:if> - </c:set> - <c:if test="${empty(name)}"> - <c:set var="name">${su:substringAfter(path, ".")}</c:set> - </c:if> - - <c:if test="${!bare}"> - <![CDATA[<div class="]]>${divclass}<![CDATA[">]]> - <label for="${name}">${labelmsg} </label> - </c:if> - - <c:choose> - <c:when test="${multiple}"> - <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" disabled="${disabled}" onchange="${onchange}"> - - <c:set var="statusArray" value="${su:split(status.value,',')}" /> - <c:forEach items="${backingList}" var="option"> - - <c:choose> - <c:when test="${empty(property)}"> - <c:set var="optionvalue" value="${option}" /> - </c:when> - <c:otherwise> - <c:set var="optionvalue" value="${option[property]}" /> - </c:otherwise> - </c:choose> - - <ou:txtoption selected="${elx:containsString(statusArray, optionvalue)}" value="${optionvalue}"> - - <ou:compositeproperty bean="${option}" property="${text}" /> - - </ou:txtoption> - </c:forEach> - </ou:txtselect> - <!-- needed for empty submissions --> - <input type="hidden" name="_${name}" value="" /> - </c:when> - <c:otherwise> - <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" disabled="${disabled}" onchange="${onchange}" > - <c:if test="${addempty}"> - <option value="">---</option> - </c:if> - <c:forEach items="${backingList}" var="option"> - - <c:choose> - <c:when test="${empty(property)}"> - <c:set var="optionvalue" value="${option}" /> - </c:when> - <c:otherwise> - <c:set var="optionvalue" value="${option[property]}" /> - </c:otherwise> - </c:choose> - - <ou:txtoption selected="${elx:equalsString(status.value, optionvalue)}" value="${optionvalue}"> - - <ou:compositeproperty bean="${option}" property="${text}" /> - - </ou:txtoption> - </c:forEach> - </ou:txtselect> - </c:otherwise> - </c:choose> - - - <c:if test="${!bare}"> - <![CDATA[<div class="clear"><!-- --></div> </div>]]> - </c:if> - </spring:bind> - -</jsp:root> +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:spring="http://www.springframework.org/tags" + xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" + xmlns:su="http://openutils.sourceforge.net/openutils-tags-commonslang" + xmlns:elx="http://openutils.sourceforge.net/openutils-tags-elx" + xmlns:ou="http://openutils.sourceforge.net/openutils-tags-spring" + xmlns:dao="http://openutils.sourceforge.net/openutils-tags-dao"> + + <jsp:directive.attribute name="path" required="true" /> + <jsp:directive.attribute name="name" required="false" /> + <jsp:directive.attribute name="collection" required="false" /> + <jsp:directive.attribute name="property" required="false" /> + <jsp:directive.attribute name="text" required="false" /> + <jsp:directive.attribute name="multiple" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="readonly" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="disabled" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="style" required="false" /> + <jsp:directive.attribute name="findall" required="false" /> + <jsp:directive.attribute name="addempty" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="bare" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="nobind" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="onchange" required="false" /> + <jsp:directive.attribute name="key" required="false" /> + <jsp:directive.attribute name="label" required="false" type="java.lang.String" /> + + + <c:if test="${empty(key)}"> + <c:set var="key">${path}</c:set> + </c:if> + + <c:choose> + <c:when test="${!empty(collection)}"> + <c:set var="backingList" value="${requestScope[collection]}" /> + </c:when> + <c:when test="${!empty(findall)}"> + <c:set var="backingList" value="${dao:findAll(pageContext, findall)}" /> + </c:when> + </c:choose> + + + <c:choose> + <c:when test="${empty(label)}"> + <c:set var="labelmsg"> + <fmt:message key="${key}" /> + </c:set> + </c:when> + <c:otherwise> + <c:set var="labelmsg">${label}</c:set> + </c:otherwise> + </c:choose> + + <c:choose> + <c:when test="${!nobind}"> + <spring:bind path="${path}"> + <c:set var="divclass">formelement <c:if test="${!empty(status.errorMessage)}"> formelementerror</c:if> + </c:set> + <c:if test="${empty(name)}"> + <c:set var="name">${su:substringAfter(path, ".")}</c:set> + </c:if> + + <c:if test="${!bare}"> + <![CDATA[<div class="]]>${divclass}<![CDATA[">]]> + <label for="${name}">${labelmsg} </label> + </c:if> + + <c:choose> + <c:when test="${multiple}"> + <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" + disabled="${disabled}" onchange="${onchange}"> + + <c:set var="statusArray" value="${su:split(status.value,',')}" /> + <c:forEach items="${backingList}" var="option"> + + <c:choose> + <c:when test="${empty(property)}"> + <c:set var="optionvalue" value="${option}" /> + </c:when> + <c:otherwise> + <c:set var="optionvalue" value="${option[property]}" /> + </c:otherwise> + </c:choose> + + <ou:txtoption selected="${elx:containsString(statusArray, optionvalue)}" value="${optionvalue}"> + + <ou:compositeproperty bean="${option}" property="${text}" /> + + </ou:txtoption> + </c:forEach> + </ou:txtselect> + <!-- needed for empty submissions --> + <input type="hidden" name="_${name}" value="" /> + </c:when> + <c:otherwise> + <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" + disabled="${disabled}" onchange="${onchange}"> + <c:if test="${addempty}"> + <option value="">---</option> + </c:if> + <c:forEach items="${backingList}" var="option"> + + <c:choose> + <c:when test="${empty(property)}"> + <c:set var="optionvalue" value="${option}" /> + </c:when> + <c:otherwise> + <c:set var="optionvalue" value="${option[property]}" /> + </c:otherwise> + </c:choose> + + <ou:txtoption selected="${elx:equalsString(status.value, optionvalue)}" value="${optionvalue}"> + + <ou:compositeproperty bean="${option}" property="${text}" /> + + </ou:txtoption> + </c:forEach> + </ou:txtselect> + </c:otherwise> + </c:choose> + + + <c:if test="${!bare}"> + <![CDATA[<div class="clear"><!-- --></div> </div>]]> + </c:if> + </spring:bind> + </c:when> + <c:otherwise> + <c:if test="${!bare}"> + <![CDATA[<div class="]]>${divclass}<![CDATA[">]]> + <label for="${name}">${labelmsg} </label> + </c:if> + <c:choose> + <c:when test="${multiple}"> + <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" + disabled="${disabled}" onchange="${onchange}"> + + <c:set var="statusArray" value="${su:split(status.value,',')}" /> + <c:forEach items="${backingList}" var="option"> + + <c:choose> + <c:when test="${empty(property)}"> + <c:set var="optionvalue" value="${option}" /> + </c:when> + <c:otherwise> + <c:set var="optionvalue" value="${option[property]}" /> + </c:otherwise> + </c:choose> + + <ou:txtoption selected="${elx:containsString(statusArray, optionvalue)}" value="${optionvalue}"> + + <ou:compositeproperty bean="${option}" property="${text}" /> + + </ou:txtoption> + </c:forEach> + </ou:txtselect> + <!-- needed for empty submissions --> + <input type="hidden" name="_${name}" value="" /> + </c:when> + <c:otherwise> + <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" + disabled="${disabled}" onchange="${onchange}"> + <c:if test="${addempty}"> + <option value="">---</option> + </c:if> + <c:forEach items="${backingList}" var="option"> + + <c:choose> + <c:when test="${empty(property)}"> + <c:set var="optionvalue" value="${option}" /> + </c:when> + <c:otherwise> + <c:set var="optionvalue" value="${option[property]}" /> + </c:otherwise> + </c:choose> + + <ou:txtoption selected="${elx:equalsString(status.value, optionvalue)}" value="${optionvalue}"> + + <ou:compositeproperty bean="${option}" property="${text}" /> + + </ou:txtoption> + </c:forEach> + </ou:txtselect> + </c:otherwise> + </c:choose> + </c:otherwise> + </c:choose> +</jsp:root> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |