From: <fg...@us...> - 2007-02-22 14:15:57
|
Revision: 283 http://svn.sourceforge.net/openutils/?rev=283&view=rev Author: fgiust Date: 2007-02-22 06:15:58 -0800 (Thu, 22 Feb 2007) Log Message: ----------- fix binding checkboxes e nuovo calendario funzionante Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtinput.tag Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-21 17:32:31 UTC (rev 282) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-22 14:15:58 UTC (rev 283) @@ -71,14 +71,6 @@ <jsp:text>${type} ${cssclass}</jsp:text> <c:if test="${readonly}">${elx:space()}readonly</c:if> </c:set> - <c:if test="${type == 'checkbox'}"> - <c:if test="${status.value}"> - <c:set var="checked" value="${true}" /> - </c:if> - <c:if test="${empty(status.value)}"> - <c:set var="status.value" value="${true}" /> - </c:if> - </c:if> <c:choose> <c:when test="${empty(label)}"> <c:set var="labelmsg"> @@ -94,16 +86,28 @@ <c:when test="${donothing}"><!-- don't print anything --></c:when> <c:when test="${!nobind}"> <spring:bind path="${path}"> + <c:if test="${type == 'checkbox'}"></c:if> + <c:choose> + <c:when test="${type == 'checkbox'}"> + <c:if test="${status.value}"> + <c:set var="checked" value="${true}" /> + </c:if> + <c:set var="value" value="${true}" /> + </c:when> + <c:otherwise> + <c:set var="value" value="${status.value}" /> + </c:otherwise> + </c:choose> <c:set var="divclass"> <jsp:text>${divclass}</jsp:text> <c:if test="${!empty(status.errorMessage)}">${elx:space()}formelementerror</c:if> </c:set> <c:choose> <c:when test="${bare}"> - <ou:txtinput type="${type}" name="${name}" value="${status.value}" cssclass="${cssclass}" - maxlength="${maxlength}" style="${style}" readonly="${readonly}" disabled="${disabled}" - onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" - onblur="${onblur}" checked="${checked}" /> + <ou:txtinput type="${type}" name="${name}" value="${value}" cssclass="${cssclass}" maxlength="${maxlength}" + style="${style}" readonly="${readonly}" disabled="${disabled}" onkeypress="${onkeypress}" + onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}" + checked="${checked}" /> </c:when> <c:when test="${type == 'label'}"> <div class="${divclass}"> @@ -115,7 +119,7 @@ <c:otherwise> <div class="${divclass}"> <label for="${name}">${labelmsg}</label> - <ou:txtinput type="${type}" name="${name}" value="${status.value}" cssclass="${cssclass}" + <ou:txtinput type="${type}" name="${name}" value="${value}" cssclass="${cssclass}" maxlength="${maxlength}" style="${style}" readonly="${readonly}" disabled="${disabled}" onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}" checked="${checked}" /> @@ -140,6 +144,7 @@ Calendar.setup({ inputField : "${name}", // id of the input field ifFormat : "${dateformat}", // format of the input field, es "%Y-%m-%d %H:%M" + showsTime : true, // will display a time selector button : "${name}_cal", // trigger for the calendar (button ID) align : "Bl", // alignment (defaults to "Bl") singleClick : true Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtinput.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtinput.tag 2007-02-21 17:32:31 UTC (rev 282) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtinput.tag 2007-02-22 14:15:58 UTC (rev 283) @@ -162,7 +162,7 @@ <![CDATA[ />]]> </c:otherwise> </c:choose> - <c:if test="${type == checkbox}"> + <c:if test="${type == 'checkbox'}"> <input type="hidden" name="_${name}" value="${value}" /> </c:if> </jsp:root> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |