You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(39) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(19) |
Feb
(150) |
Mar
(10) |
Apr
|
May
(8) |
Jun
(11) |
Jul
(27) |
Aug
(52) |
Sep
(35) |
Oct
(30) |
Nov
(18) |
Dec
(4) |
2008 |
Jan
(76) |
Feb
(121) |
Mar
(39) |
Apr
(55) |
May
(18) |
Jun
(49) |
Jul
(32) |
Aug
(4) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(33) |
2009 |
Jan
(19) |
Feb
(87) |
Mar
(69) |
Apr
(38) |
May
(47) |
Jun
(20) |
Jul
(5) |
Aug
(76) |
Sep
(145) |
Oct
(34) |
Nov
(8) |
Dec
(68) |
2010 |
Jan
(150) |
Feb
(379) |
Mar
(191) |
Apr
(100) |
May
(525) |
Jun
(269) |
Jul
(127) |
Aug
(190) |
Sep
(190) |
Oct
(29) |
Nov
(147) |
Dec
(83) |
2011 |
Jan
(188) |
Feb
(81) |
Mar
(43) |
Apr
(97) |
May
(63) |
Jun
(129) |
Jul
(17) |
Aug
(124) |
Sep
(6) |
Oct
(20) |
Nov
(67) |
Dec
(23) |
2012 |
Jan
(6) |
Feb
(14) |
Mar
(181) |
Apr
(64) |
May
(102) |
Jun
(47) |
Jul
(26) |
Aug
(3) |
Sep
(1) |
Oct
(14) |
Nov
(13) |
Dec
(23) |
2013 |
Jan
(4) |
Feb
(14) |
Mar
(18) |
Apr
(14) |
May
(27) |
Jun
(27) |
Jul
(5) |
Aug
(2) |
Sep
(74) |
Oct
(79) |
Nov
(21) |
Dec
(97) |
2014 |
Jan
(6) |
Feb
(3) |
Mar
(8) |
Apr
|
May
(5) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(3) |
Oct
(10) |
Nov
(6) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fg...@us...> - 2007-02-16 09:40:50
|
Revision: 264 http://svn.sourceforge.net/openutils/?rev=264&view=rev Author: fgiust Date: 2007-02-16 01:40:51 -0800 (Fri, 16 Feb 2007) Log Message: ----------- kill references to commons-logging, use slf4j Modified Paths: -------------- trunk/openutils-spring/src/main/java/it/openutils/web/spring/BaseFormController.java trunk/openutils-spring/src/main/java/it/openutils/web/spring/MultiController.java Modified: trunk/openutils-spring/src/main/java/it/openutils/web/spring/BaseFormController.java =================================================================== --- trunk/openutils-spring/src/main/java/it/openutils/web/spring/BaseFormController.java 2007-02-15 22:58:53 UTC (rev 263) +++ trunk/openutils-spring/src/main/java/it/openutils/web/spring/BaseFormController.java 2007-02-16 09:40:51 UTC (rev 264) @@ -8,8 +8,8 @@ import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.ClassUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.beans.propertyeditors.StringTrimmerEditor; @@ -27,7 +27,7 @@ /** * Logger. */ - protected Log log = LogFactory.getLog(getClass()); + protected Logger log = LoggerFactory.getLogger(getClass()); /** * {@inheritDoc} Modified: trunk/openutils-spring/src/main/java/it/openutils/web/spring/MultiController.java =================================================================== --- trunk/openutils-spring/src/main/java/it/openutils/web/spring/MultiController.java 2007-02-15 22:58:53 UTC (rev 263) +++ trunk/openutils-spring/src/main/java/it/openutils/web/spring/MultiController.java 2007-02-16 09:40:51 UTC (rev 264) @@ -6,8 +6,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.ClassUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; import org.springframework.web.servlet.mvc.multiaction.MultiActionController; @@ -24,7 +24,7 @@ /** * Logger. */ - protected Log log = LogFactory.getLog(getClass()); + protected Logger log = LoggerFactory.getLogger(getClass()); /** * Jsp name. @@ -59,7 +59,7 @@ */ public String getText(String msgKey, Object arg) { - return getText(msgKey, new Object[]{arg}); + return getText(msgKey, new Object[]{arg }); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-15 22:58:57
|
Revision: 263 http://svn.sourceforge.net/openutils/?rev=263&view=rev Author: fgiust Date: 2007-02-15 14:58:53 -0800 (Thu, 15 Feb 2007) Log Message: ----------- use path in select if name is not set 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/select.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-14 21:52:07 UTC (rev 262) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-15 22:58:53 UTC (rev 263) @@ -50,6 +50,11 @@ <c:set var="type" value="text" /> <c:set var="datepicker" value="${true}" /> </c:if> + <c:if test="${su:substringBefore(type, ' ') == 'date'}"> + <c:set var="type" value="text" /> + <c:set var="dateformat" value="${su:substringAfter(type, ' ')}" /> + <c:set var="datepickernew" value="${true}" /> + </c:if> <c:if test="${maxlength ge 256}"> <c:set var="type" value="textarea" /> </c:if> @@ -112,6 +117,22 @@ <![endif]--> <script type="text/javascript">createCalendar('${status.value}', 'divdata${name}', '${name}')</script> </c:if> + <c:if test="${datepickernew}"> + <a title="seleziona" class="calbtn" id="${name}_cal"> + <span>C</span> + </a> + <script type="text/javascript"> + <![CDATA[ + Calendar.setup({ + inputField : "${name}", // id of the input field + ifFormat : "${dateformat}", // format of the input field, es "%Y-%m-%d %H:%M" + button : "${name}_cal", // trigger for the calendar (button ID) + align : "Bl", // alignment (defaults to "Bl") + singleClick : true + }); + ]]> + </script> + </c:if> <div class="clear"><!-- --></div> </div> </c:otherwise> 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-14 21:52:07 UTC (rev 262) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-15 22:58:53 UTC (rev 263) @@ -43,7 +43,10 @@ </c:choose> <c:set var="divclass">formelement</c:set> <c:if test="${empty(name)}"> - <c:set var="name">${su:substringAfter(path, ".")}</c:set> + <c:set var="name" value="${su:substringAfter(path, '.')}" /> + <c:if test="${empty(name)}"> + <c:set var="name" value="${path}" /> + </c:if> </c:if> <c:choose> <c:when test="${!nobind}"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-14 21:52:07
|
Revision: 262 http://svn.sourceforge.net/openutils/?rev=262&view=rev Author: fgiust Date: 2007-02-14 13:52:07 -0800 (Wed, 14 Feb 2007) Log Message: ----------- use bind for label Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.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-14 21:45:23 UTC (rev 261) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-14 21:52:07 UTC (rev 262) @@ -53,9 +53,6 @@ <c:if test="${maxlength ge 256}"> <c:set var="type" value="textarea" /> </c:if> - <c:if test="${type eq 'label'}"> - <c:set var="nobind" value="${true}" /> - </c:if> <c:set var="divclass"> <jsp:text>formelement formelement${type}</jsp:text> </c:set> @@ -89,6 +86,13 @@ onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}" checked="${status.value}" /> </c:when> + <c:when test="${type == 'label'}"> + <div class="${divclass}"> + <label for="${name}">${labelmsg}</label> + <span class="text">${status.value}</span> + <div class="clear"><!-- --></div> + </div> + </c:when> <c:otherwise> <div class="${divclass}"> <label for="${name}">${labelmsg}</label> @@ -122,13 +126,6 @@ onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}" /> </c:when> - <c:when test="${type == 'label'}"> - <div class="${divclass}"> - <label for="${name}">${labelmsg}</label> - <span class="text">${status.value}</span> - <div class="clear"><!-- --></div> - </div> - </c:when> <c:otherwise> <div class="${divclass}"> <label for="${name}">${labelmsg}</label> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-14 21:45:26
|
Revision: 261 http://svn.sourceforge.net/openutils/?rev=261&view=rev Author: fgiust Date: 2007-02-14 13:45:23 -0800 (Wed, 14 Feb 2007) Log Message: ----------- still unable to deploy, revert release once more Removed Paths: ------------- tags/openutils-tags-spring-0.3/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-14 21:38:55
|
Revision: 260 http://svn.sourceforge.net/openutils/?rev=260&view=rev Author: fgiust Date: 2007-02-14 13:38:56 -0800 (Wed, 14 Feb 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-tags-spring/pom.xml Modified: trunk/openutils-tags-spring/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-02-14 21:38:49 UTC (rev 259) +++ trunk/openutils-tags-spring/pom.xml 2007-02-14 21:38:56 UTC (rev 260) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-tags-spring</artifactId> <name>openutils tags for spring MVC</name> - <version>0.3</version> + <version>1.0-SNAPSHOT</version> <description /> <dependencies> <dependency> @@ -76,10 +76,4 @@ <scope>test</scope> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-tags-spring-0.3</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-14 21:38:53
|
Revision: 259 http://svn.sourceforge.net/openutils/?rev=259&view=rev Author: fgiust Date: 2007-02-14 13:38:49 -0800 (Wed, 14 Feb 2007) Log Message: ----------- [maven-scm] copy for tag openutils-tags-spring-0.3 Added Paths: ----------- tags/openutils-tags-spring-0.3/ tags/openutils-tags-spring-0.3/pom.xml tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/ tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-debug.tld tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-spring.tld tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/checkbox.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/date.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/debug.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/input.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/li.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/messages.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/select.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txtinput.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txtoption.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txtselect.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txttextarea.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/url.tag Removed Paths: ------------- tags/openutils-tags-spring-0.3/pom.xml tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-spring.tld tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/checkbox.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/date.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/daterange.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/debug.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docbutton.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docframe.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docprintbutton.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docsvg.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/input.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/li.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/messages.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/na.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/select.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/text.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txtinput.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txtoption.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txtselect.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/txttextarea.tag tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/url.tag Copied: tags/openutils-tags-spring-0.3 (from rev 244, trunk/openutils-tags-spring) Deleted: tags/openutils-tags-spring-0.3/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/pom.xml 2007-02-14 21:38:49 UTC (rev 259) @@ -1,79 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-tags-spring</artifactId> - <name>openutils tags for spring MVC</name> - <version>1.0-SNAPSHOT</version> - <description /> - <dependencies> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>jstl</groupId> - <artifactId>jstl</artifactId> - <version>1.1.2</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <version>2.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.2</version> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.7.0</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>2.0.1</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>taglibs</groupId> - <artifactId>standard</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.13</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.0</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-tags-spring-0.3/pom.xml (from rev 258, trunk/openutils-tags-spring/pom.xml) =================================================================== --- tags/openutils-tags-spring-0.3/pom.xml (rev 0) +++ tags/openutils-tags-spring-0.3/pom.xml 2007-02-14 21:38:49 UTC (rev 259) @@ -0,0 +1,85 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-tags-spring</artifactId> + <name>openutils tags for spring MVC</name> + <version>0.3</version> + <description /> + <dependencies> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>jstl</groupId> + <artifactId>jstl</artifactId> + <version>1.1.2</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.7.0</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>2.0.1</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.0</version> + <scope>test</scope> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-tags-spring-0.3</url> + </scm> +</project> \ No newline at end of file Copied: tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag (from rev 253, trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag) Deleted: tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java =================================================================== --- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java 2007-02-13 21:21:37 UTC (rev 253) +++ tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java 2007-02-14 21:38:49 UTC (rev 259) @@ -1,114 +0,0 @@ -package it.openutils.web.tag.debug; - -import java.util.Enumeration; -import java.util.HashMap; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - - -/** - * @author fgiust - * @version $Revision$ ($Author$) - */ -public class DebugAttributesTag extends BaseDebugTag -{ - - /** - * Stable <code>serialVersionUID</code> - */ - private static final long serialVersionUID = 222; - - /** - * riferimento al Logger - */ - private static Log log = LogFactory.getLog(DebugAttributesTag.class); - - /** - * Scope. Pu� assumere i valori: - * <ul> - * <li>PageContext.PAGE_SCOPE</li> - * <li>PageContext.REQUEST_SCOPE</li> - * <li>PageContext.SESSION_SCOPE</li> - * <li>PageContext.APPLICATION_SCOPE</li> - * </ul> - * Corrispondenti alle stringhe settate tramite l'attributo "scope" del tag: - * <ul> - * <li>page</li> - * <li>request</li> - * <li>session</li> - * <li>application</li> - * </ul> - */ - private int scope = PageContext.PAGE_SCOPE; - - /** - * Setta lo scope in cui recuperare la collezione su cui iterare - * @param scopeString Scope dell'oggetto collection - * @throws JspException se il valore passato non � tra: "page", "request", "session", "application" - */ - public void setScope(String scopeString) throws JspException - { - - if (scopeString.equalsIgnoreCase("page")) - { - scope = PageContext.PAGE_SCOPE; - } - else if (scopeString.equalsIgnoreCase("request")) - { - scope = PageContext.REQUEST_SCOPE; - } - else if (scopeString.equalsIgnoreCase("session")) - { - scope = PageContext.SESSION_SCOPE; - } - else if (scopeString.equalsIgnoreCase("application")) - { - scope = PageContext.APPLICATION_SCOPE; - } - else - { - log.error("Attributo \"scope\" non valido. Valore fornito= [" - + scopeString - + "]; valori ammessi: page, request, session, application"); - throw new JspException("Attributo \"scope\" non valido. Valore fornito= [" - + scopeString - + "]; valori ammessi: page, request, session, application"); - } - } - - /** - * crea l'HashMap che evrr� stampata nel metodo doEndTag() - * @return int - * @throws JspException eccezione generica - * @see javax.servlet.jsp.tagext.Tag#doStartTag() - */ - @Override - public int doStartTag() throws JspException - { - - HashMap map = new HashMap(); - - Enumeration enm = pageContext.getAttributeNamesInScope(scope); - - while (enm.hasMoreElements()) - { - String key = enm.nextElement().toString(); - - if (!(scope == PageContext.PAGE_SCOPE && key.startsWith("javax.servlet"))) - { - Object value = pageContext.getAttribute(key, scope); - map.put(key, value); - } - } - - setOutputClassName(true); - setDebugMap(map); - - return super.doStartTag(); - } - -} \ No newline at end of file Copied: tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java (from rev 257, trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java) =================================================================== --- tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java (rev 0) +++ tags/openutils-tags-spring-0.3/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java 2007-02-14 21:38:49 UTC (rev 259) @@ -0,0 +1,120 @@ +package it.openutils.web.tag.debug; + +import java.util.Enumeration; +import java.util.HashMap; + +import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + + +/** + * @author fgiust + * @version $Revision$ ($Author$) + */ +public class DebugAttributesTag extends BaseDebugTag +{ + + /** + * Stable <code>serialVersionUID</code> + */ + private static final long serialVersionUID = 222; + + /** + * riferimento al Logger + */ + private static Log log = LogFactory.getLog(DebugAttributesTag.class); + + /** + * Scope. Pu� assumere i valori: + * <ul> + * <li>PageContext.PAGE_SCOPE</li> + * <li>PageContext.REQUEST_SCOPE</li> + * <li>PageContext.SESSION_SCOPE</li> + * <li>PageContext.APPLICATION_SCOPE</li> + * </ul> + * Corrispondenti alle stringhe settate tramite l'attributo "scope" del tag: + * <ul> + * <li>page</li> + * <li>request</li> + * <li>session</li> + * <li>application</li> + * </ul> + */ + private int scope = PageContext.PAGE_SCOPE; + + /** + * Setta lo scope in cui recuperare la collezione su cui iterare + * @param scopeString Scope dell'oggetto collection + * @throws JspException se il valore passato non � tra: "page", "request", "session", "application" + */ + public void setScope(String scopeString) throws JspException + { + + if (scopeString.equalsIgnoreCase("page")) + { + scope = PageContext.PAGE_SCOPE; + } + else if (scopeString.equalsIgnoreCase("request")) + { + scope = PageContext.REQUEST_SCOPE; + } + else if (scopeString.equalsIgnoreCase("session")) + { + scope = PageContext.SESSION_SCOPE; + } + else if (scopeString.equalsIgnoreCase("application")) + { + scope = PageContext.APPLICATION_SCOPE; + } + else + { + log.error("Attributo \"scope\" non valido. Valore fornito= [" + + scopeString + + "]; valori ammessi: page, request, session, application"); + throw new JspException("Attributo \"scope\" non valido. Valore fornito= [" + + scopeString + + "]; valori ammessi: page, request, session, application"); + } + } + + /** + * crea l'HashMap che evrr� stampata nel metodo doEndTag() + * @return int + * @throws JspException eccezione generica + * @see javax.servlet.jsp.tagext.Tag#doStartTag() + */ + @Override + public int doStartTag() throws JspException + { + + HashMap map = new HashMap(); + try + { + Enumeration enm = pageContext.getAttributeNamesInScope(scope); + + while (enm.hasMoreElements()) + { + String key = enm.nextElement().toString(); + + if (!(scope == PageContext.PAGE_SCOPE && key.startsWith("javax.servlet"))) + { + Object value = pageContext.getAttribute(key, scope); + map.put(key, value); + } + } + } + catch (IllegalStateException e) + { + // ignore, no attributes available + } + + setOutputClassName(true); + setDebugMap(map); + + return super.doStartTag(); + } + +} \ No newline at end of file Copied: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-debug.tld (from rev 253, trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-debug.tld) =================================================================== --- tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-debug.tld (rev 0) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-debug.tld 2007-02-14 21:38:49 UTC (rev 259) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> +<taglib> + <tlib-version>1.1</tlib-version> + <jsp-version>1.2</jsp-version> + <short-name>debug</short-name> + <uri>http://openutils.sourceforge.net/openutils-tags-debug</uri> + <description>Debug tag library</description> + <tag> + <name>attributes</name> + <tag-class>it.openutils.web.tag.debug.DebugAttributesTag</tag-class> + <body-content>empty</body-content> + <attribute> + <name>scope</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>parameters</name> + <tag-class>it.openutils.web.tag.debug.DebugParametersTag</tag-class> + <body-content>empty</body-content> + </tag> + <tag> + <name>execution</name> + <tag-class>it.openutils.web.tag.debug.DebugExecutionTag</tag-class> + <body-content>empty</body-content> + </tag> + <tag> + <name>headers</name> + <tag-class>it.openutils.web.tag.debug.DebugHeadersTag</tag-class> + <body-content>empty</body-content> + </tag> +</taglib> \ No newline at end of file Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-spring.tld =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-spring.tld 2007-02-14 21:38:49 UTC (rev 259) @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"> - <description>Tag library for tag file directory /META-INF/tags/ou/</description> - <tlib-version>1.0</tlib-version> - <short-name>openutils-tags-spring</short-name> - <uri>http://openutils.sourceforge.net/openutils-tags-spring</uri> - <!-- generated using mvn net.sourceforge.maven-taglib:maven-taglib-plugin:tldgenerate --> - <tag-file> - <name>button</name> - <path>/META-INF/tags/ou/button.tag</path> - </tag-file> - <tag-file> - <name>buttons</name> - <path>/META-INF/tags/ou/buttons.tag</path> - </tag-file> - <tag-file> - <name>checkbox</name> - <path>/META-INF/tags/ou/checkbox.tag</path> - </tag-file> - <tag-file> - <name>compositeproperty</name> - <path>/META-INF/tags/ou/compositeproperty.tag</path> - </tag-file> - <tag-file> - <name>date</name> - <path>/META-INF/tags/ou/date.tag</path> - </tag-file> - <tag-file> - <name>daterange</name> - <path>/META-INF/tags/ou/daterange.tag</path> - </tag-file> - <tag-file> - <name>debug</name> - <path>/META-INF/tags/ou/debug.tag</path> - </tag-file> - <tag-file> - <name>docbutton</name> - <path>/META-INF/tags/ou/docbutton.tag</path> - </tag-file> - <tag-file> - <name>docframe</name> - <path>/META-INF/tags/ou/docframe.tag</path> - </tag-file> - <tag-file> - <name>docprintbutton</name> - <path>/META-INF/tags/ou/docprintbutton.tag</path> - </tag-file> - <tag-file> - <name>docsvg</name> - <path>/META-INF/tags/ou/docsvg.tag</path> - </tag-file> - <tag-file> - <name>errorbox</name> - <path>/META-INF/tags/ou/errorbox.tag</path> - </tag-file> - <tag-file> - <name>input</name> - <path>/META-INF/tags/ou/input.tag</path> - </tag-file> - <tag-file> - <name>li</name> - <path>/META-INF/tags/ou/li.tag</path> - </tag-file> - <tag-file> - <name>messages</name> - <path>/META-INF/tags/ou/messages.tag</path> - </tag-file> - <tag-file> - <name>na</name> - <path>/META-INF/tags/ou/na.tag</path> - </tag-file> - <tag-file> - <name>select</name> - <path>/META-INF/tags/ou/select.tag</path> - </tag-file> - <tag-file> - <name>tablelang</name> - <path>/META-INF/tags/ou/tablelang.tag</path> - </tag-file> - <tag-file> - <name>text</name> - <path>/META-INF/tags/ou/text.tag</path> - </tag-file> - <tag-file> - <name>txtinput</name> - <path>/META-INF/tags/ou/txtinput.tag</path> - </tag-file> - <tag-file> - <name>txtoption</name> - <path>/META-INF/tags/ou/txtoption.tag</path> - </tag-file> - <tag-file> - <name>txtselect</name> - <path>/META-INF/tags/ou/txtselect.tag</path> - </tag-file> - <tag-file> - <name>txttextarea</name> - <path>/META-INF/tags/ou/txttextarea.tag</path> - </tag-file> - <tag-file> - <name>ul</name> - <path>/META-INF/tags/ou/ul.tag</path> - </tag-file> - <tag-file> - <name>url</name> - <path>/META-INF/tags/ou/url.tag</path> - </tag-file> -</taglib> Copied: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-spring.tld (from rev 256, trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld) =================================================================== --- tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-spring.tld (rev 0) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/openutils-tags-spring.tld 2007-02-14 21:38:49 UTC (rev 259) @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"> + <description>Tag library for tag file directory /META-INF/tags/ou/</description> + <tlib-version>1.0</tlib-version> + <short-name>openutils-tags-spring</short-name> + <uri>http://openutils.sourceforge.net/openutils-tags-spring</uri> + <!-- generated using mvn net.sourceforge.maven-taglib:maven-taglib-plugin:tldgenerate --> + <tag-file> + <name>button</name> + <path>/META-INF/tags/ou/button.tag</path> + </tag-file> + <tag-file> + <name>buttons</name> + <path>/META-INF/tags/ou/buttons.tag</path> + </tag-file> + <tag-file> + <name>checkbox</name> + <path>/META-INF/tags/ou/checkbox.tag</path> + </tag-file> + <tag-file> + <name>compositeproperty</name> + <path>/META-INF/tags/ou/compositeproperty.tag</path> + </tag-file> + <tag-file> + <name>date</name> + <path>/META-INF/tags/ou/date.tag</path> + </tag-file> + <tag-file> + <name>debug</name> + <path>/META-INF/tags/ou/debug.tag</path> + </tag-file> + <tag-file> + <name>errorbox</name> + <path>/META-INF/tags/ou/errorbox.tag</path> + </tag-file> + <tag-file> + <name>input</name> + <path>/META-INF/tags/ou/input.tag</path> + </tag-file> + <tag-file> + <name>li</name> + <path>/META-INF/tags/ou/li.tag</path> + </tag-file> + <tag-file> + <name>messages</name> + <path>/META-INF/tags/ou/messages.tag</path> + </tag-file> + <tag-file> + <name>select</name> + <path>/META-INF/tags/ou/select.tag</path> + </tag-file> + <tag-file> + <name>tablelang</name> + <path>/META-INF/tags/ou/tablelang.tag</path> + </tag-file> + <tag-file> + <name>txtinput</name> + <path>/META-INF/tags/ou/txtinput.tag</path> + </tag-file> + <tag-file> + <name>txtoption</name> + <path>/META-INF/tags/ou/txtoption.tag</path> + </tag-file> + <tag-file> + <name>txtselect</name> + <path>/META-INF/tags/ou/txtselect.tag</path> + </tag-file> + <tag-file> + <name>txttextarea</name> + <path>/META-INF/tags/ou/txttextarea.tag</path> + </tag-file> + <tag-file> + <name>ul</name> + <path>/META-INF/tags/ou/ul.tag</path> + </tag-file> + <tag-file> + <name>url</name> + <path>/META-INF/tags/ou/url.tag</path> + </tag-file> +</taglib> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/checkbox.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/checkbox.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/checkbox.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,68 +0,0 @@ -<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:ou="http://openutils.sourceforge.net/openutils-tags-spring"> - - <jsp:directive.attribute name="path" required="true" /> - <jsp:directive.attribute name="name" required="false" /> - <jsp:directive.attribute name="bare" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="multiline" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="style" required="false" /> - - <spring:bind path="${path}"> - <c:if test="${empty(name)}"> - <c:set var="name">${su:substringAfter(path, ".")}</c:set> - </c:if> - - - <c:choose> - <c:when test="${bare}"> - <c:choose> - <c:when test="${status.value}"> - <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" checked="checked" /> - </c:when> - <c:otherwise> - <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" /> - </c:otherwise> - </c:choose> - <input type="hidden" name="_${name}" /> - </c:when> - <c:when test="${multiline}"> - <c:set var="divclass">formelement <c:if test="${!empty(status.errorMessage)}"> formelementerror</c:if></c:set> - - <div class="${divclass}" style="${style}"> - <label for="${name}"><fmt:message key="${path}" />:</label> - <c:choose> - <c:when test="${status.value}"> - <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" checked="checked" /> - </c:when> - <c:otherwise> - <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" /> - </c:otherwise> - </c:choose> - <input type="hidden" name="_${name}" /> - <div class="clear"><!-- --></div> - </div> - </c:when> - <c:otherwise> - <c:set var="divclass">formelementch<c:if test="${!empty(status.errorMessage)}"><![CDATA[ ]]>formelementerror</c:if></c:set> - <span class="${divclass}" style="${style}"> - <c:choose> - <c:when test="${status.value}"> - <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" checked="checked" /> - </c:when> - <c:otherwise> - <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" /> - </c:otherwise> - </c:choose> - <input type="hidden" name="_${name}" /> - <jsp:text><![CDATA[ ]]></jsp:text> - <span class="chlabel"><fmt:message key="${path}" /></span> - </span> - </c:otherwise> - </c:choose> - - - </spring:bind> - -</jsp:root> Copied: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/checkbox.tag (from rev 251, trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/checkbox.tag) =================================================================== --- tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/checkbox.tag (rev 0) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/checkbox.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -0,0 +1,72 @@ +<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:ou="http://openutils.sourceforge.net/openutils-tags-spring"> + + <jsp:directive.attribute name="path" required="true" /> + <jsp:directive.attribute name="name" required="false" /> + <jsp:directive.attribute name="bare" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="multiline" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="style" required="false" /> + + <jsp:scriptlet> + System.err.println("Warning ou:checkbox is deprecated, please use ou:input type=\"checkbox\" instead "); + </jsp:scriptlet> + + <spring:bind path="${path}"> + <c:if test="${empty(name)}"> + <c:set var="name">${su:substringAfter(path, ".")}</c:set> + </c:if> + + + <c:choose> + <c:when test="${bare}"> + <c:choose> + <c:when test="${status.value}"> + <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" checked="checked" /> + </c:when> + <c:otherwise> + <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" /> + </c:otherwise> + </c:choose> + <input type="hidden" name="_${name}" /> + </c:when> + <c:when test="${multiline}"> + <c:set var="divclass">formelement <c:if test="${!empty(status.errorMessage)}"> formelementerror</c:if></c:set> + + <div class="${divclass}" style="${style}"> + <label for="${name}"><fmt:message key="${path}" />:</label> + <c:choose> + <c:when test="${status.value}"> + <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" checked="checked" /> + </c:when> + <c:otherwise> + <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" /> + </c:otherwise> + </c:choose> + <input type="hidden" name="_${name}" /> + <div class="clear"><!-- --></div> + </div> + </c:when> + <c:otherwise> + <c:set var="divclass">formelementch<c:if test="${!empty(status.errorMessage)}"><![CDATA[ ]]>formelementerror</c:if></c:set> + <span class="${divclass}" style="${style}"> + <c:choose> + <c:when test="${status.value}"> + <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" checked="checked" /> + </c:when> + <c:otherwise> + <input type="checkbox" name="${name}" id="${name}" value="true" class="checkbox" /> + </c:otherwise> + </c:choose> + <input type="hidden" name="_${name}" /> + <jsp:text><![CDATA[ ]]></jsp:text> + <span class="chlabel"><fmt:message key="${path}" /></span> + </span> + </c:otherwise> + </c:choose> + + + </spring:bind> + +</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/date.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/date.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/date.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,100 +0,0 @@ -<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:ou="http://openutils.sourceforge.net/openutils-tags-spring"> - - <jsp:directive.attribute name="path" required="true" /> - <jsp:directive.attribute name="name" required="false" /> - <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="type" required="false" /> - <jsp:directive.attribute name="nobind" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="style" required="false" /> - <jsp:directive.attribute name="onkeypress" required="false" /> - <jsp:directive.attribute name="onkeydown" required="false" /> - <jsp:directive.attribute name="onkeyup" required="false" /> - <jsp:directive.attribute name="onchange" required="false" /> - <jsp:directive.attribute name="cssclass" required="false" /> - <jsp:directive.attribute name="key" required="false" /> - <jsp:directive.attribute name="onblur" 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:if test="${empty(name)}"> - <c:set var="name">${su:substringAfter(path, ".")}</c:set> - </c:if> - <c:if test="${empty(maxlength)}"> - <c:set var="maxlength">30</c:set> - </c:if> - <c:if test="${empty(style)}"> - <c:set var="style">width: 75px</c:set> - </c:if> - <c:if test="${type == 'key' and !empty(status.value)}"> - <c:set var="type">hidden</c:set> - </c:if> - <c:if test="${type == 'keyshow' and !empty(status.value)}"> - <c:set var="readonly" value="${true}" /> - </c:if> - <c:set var="divclass">formelement</c:set> - - - <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> - - - <div class="${divclass}"> - <label for="${name}">${labelmsg}:</label> - - <ou:txtinput type="text" name="${name}" value="${status.value}" cssclass="text ${cssclass}" maxlength="${maxlength}" style="${style}" readonly="${readonly}" disabled="${disabled}" onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}"/> - - <a href="javascript:showCal('divdata${name}','${name}')" title="seleziona" class="calbtn"><span>C</span></a> - - <div class="calendar" id="divdata${name}" style="display:none"><!-- --></div> - -<!--[if gte IE 5.5]> -<iframe id='divdata${name}iframe' class='calendarIframe' src='javascript:false;' frameBorder='0' scrolling='no' style="display:none;filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"><!-- x --></iframe> -<![endif]--> - <div class="clear"><!-- --></div> - </div> - <script type="text/javascript"> - createCalendar('${status.value}', 'divdata${name}', '${name}') - </script> - - - </spring:bind> - </c:when> - <c:otherwise> - - - <div class="${divclass}"> - <label for="${name}">${labelmsg}:</label> - - <ou:txtinput type="text" name="${name}" value="${status.value}" cssclass="text" maxlength="10" style="${style}" readonly="${readonly}" disabled="${disabled}" onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}"/> - - - </div> - - - - <div class="clear"><!-- --></div> - - - </c:otherwise> - </c:choose> - - - -</jsp:root> Copied: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/date.tag (from rev 251, trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/date.tag) =================================================================== --- tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/date.tag (rev 0) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/date.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -0,0 +1,104 @@ +<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:ou="http://openutils.sourceforge.net/openutils-tags-spring"> + + <jsp:directive.attribute name="path" required="true" /> + <jsp:directive.attribute name="name" required="false" /> + <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="type" required="false" /> + <jsp:directive.attribute name="nobind" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="style" required="false" /> + <jsp:directive.attribute name="onkeypress" required="false" /> + <jsp:directive.attribute name="onkeydown" required="false" /> + <jsp:directive.attribute name="onkeyup" required="false" /> + <jsp:directive.attribute name="onchange" required="false" /> + <jsp:directive.attribute name="cssclass" required="false" /> + <jsp:directive.attribute name="key" required="false" /> + <jsp:directive.attribute name="onblur" required="false" /> + <jsp:directive.attribute name="label" required="false" type="java.lang.String" /> + + + <jsp:scriptlet> + System.err.println("Warning ou:date is deprecated, please use ou:input type=\"date\" instead "); + </jsp:scriptlet> + + <c:if test="${empty(key)}"> + <c:set var="key">${path}</c:set> + </c:if> + <c:if test="${empty(name)}"> + <c:set var="name">${su:substringAfter(path, ".")}</c:set> + </c:if> + <c:if test="${empty(maxlength)}"> + <c:set var="maxlength">30</c:set> + </c:if> + <c:if test="${empty(style)}"> + <c:set var="style">width: 75px</c:set> + </c:if> + <c:if test="${type == 'key' and !empty(status.value)}"> + <c:set var="type">hidden</c:set> + </c:if> + <c:if test="${type == 'keyshow' and !empty(status.value)}"> + <c:set var="readonly" value="${true}" /> + </c:if> + <c:set var="divclass">formelement</c:set> + + + <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> + + + <div class="${divclass}"> + <label for="${name}">${labelmsg}:</label> + + <ou:txtinput type="text" name="${name}" value="${status.value}" cssclass="text ${cssclass}" maxlength="${maxlength}" style="${style}" readonly="${readonly}" disabled="${disabled}" onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}"/> + + <a href="javascript:showCal('divdata${name}','${name}')" title="seleziona" class="calbtn"><span>C</span></a> + + <div class="calendar" id="divdata${name}" style="display:none"><!-- --></div> + +<!--[if gte IE 5.5]> +<iframe id='divdata${name}iframe' class='calendarIframe' src='javascript:false;' frameBorder='0' scrolling='no' style="display:none;filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"><!-- x --></iframe> +<![endif]--> + <div class="clear"><!-- --></div> + </div> + <script type="text/javascript"> + createCalendar('${status.value}', 'divdata${name}', '${name}') + </script> + + + </spring:bind> + </c:when> + <c:otherwise> + + + <div class="${divclass}"> + <label for="${name}">${labelmsg}:</label> + + <ou:txtinput type="text" name="${name}" value="${status.value}" cssclass="text" maxlength="10" style="${style}" readonly="${readonly}" disabled="${disabled}" onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}"/> + + + </div> + + + + <div class="clear"><!-- --></div> + + + </c:otherwise> + </c:choose> + + + +</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/daterange.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/daterange.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/daterange.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,30 +0,0 @@ -<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"> - <jsp:directive.attribute name="from" required="true" type="java.util.Date" /> - <jsp:directive.attribute name="to" required="true" type="java.util.Date" /> - <!-- elimina date anteriori al 1970 --> - <c:if test="${from.time le 0}"> - <c:remove var="from" /> - </c:if> - <c:if test="${to.time le 0}"> - <c:remove var="to" /> - </c:if> - <c:if test="${(from != null) or (to != null)}"> - <jsp:text> (</jsp:text> - <c:if test="${from != null}"> - <fmt:message key="daterange.from" /> - <jsp:text> </jsp:text> - <fmt:formatDate value="${from}" type="date" pattern="dd/MM/yyyy" /> - <c:if test="${to != null}"> - <jsp:text> </jsp:text> - </c:if> - </c:if> - - <c:if test="${to != null}"> - <fmt:message key="daterange.to" /> - <jsp:text> </jsp:text> - <fmt:formatDate value="${to}" type="date" pattern="dd/MM/yyyy" /> - </c:if> - <jsp:text>) </jsp:text> - </c:if> -</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/debug.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/debug.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/debug.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,47 +0,0 @@ -<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:debug="urn:jsptld:debug" xmlns:c="http://java.sun.com/jsp/jstl/core"> - - <script type="text/javascript"> - <![CDATA[ - function showDebug(pId) { - lDebugDiv = document.getElementById(pId); - if (lDebugDiv.style.display == "block") { - lDebugDiv.style.display="none"; - } - else - { - lDebugDiv.style.display="block"; - } - } - ]]> - </script> - <div class="debugtabs"><a href="javascript:showDebug('debug')">&raquo; debug</a></div> - <div id="debug" class="debug" style="display:none"> - <table> - <tr> - <th onclick="showDebug('parameters')">Parameters</th> - <td id="parameters" style="display:none"><debug:parameters /></td> - </tr> - <tr> - <th onclick="showDebug('request')">Request</th> - <td id="request" style="display:none"><debug:attributes scope="request" /></td> - </tr> - <tr> - <th onclick="showDebug('session')">Session</th> - <td id="session" style="display:none"><debug:attributes scope="session" /></td> - </tr> - <tr> - <th onclick="showDebug('page')">Page</th> - <td id="page" style="display:none"><debug:attributes scope="page" /></td> - </tr> - <tr> - <th onclick="showDebug('application')">Application</th> - <td id="application" style="display:none"><debug:attributes scope="application" /></td> - </tr> - <tr> - <th onclick="showDebug('headers')">Request headers</th> - <td id="headers" style="display:none"><debug:headers /></td> - </tr> - </table> - </div> -</jsp:root> Copied: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/debug.tag (from rev 253, trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/debug.tag) =================================================================== --- tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/debug.tag (rev 0) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/debug.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -0,0 +1,60 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:debug="http://openutils.sourceforge.net/openutils-tags-debug" xmlns:c="http://java.sun.com/jsp/jstl/core"> + <script type="text/javascript"> + <![CDATA[ + function showDebug(pId) { + lDebugDiv = document.getElementById(pId); + if (lDebugDiv.style.display == "block") { + lDebugDiv.style.display="none"; + } + else + { + lDebugDiv.style.display="block"; + } + } + ]]> + </script> + <div class="debugtabs"> + <a href="javascript:showDebug('debug')">&raquo; debug</a> + </div> + <div id="debug" class="debug" style="display:none"> + <table> + <tr> + <th onclick="showDebug('parameters')">Parameters</th> + <td id="parameters" style="display:none"> + <debug:parameters /> + </td> + </tr> + <tr> + <th onclick="showDebug('request')">Request</th> + <td id="request" style="display:none"> + <debug:attributes scope="request" /> + </td> + </tr> + <tr> + <th onclick="showDebug('session')">Session</th> + <td id="session" style="display:none"> + <debug:attributes scope="session" /> + </td> + </tr> + <tr> + <th onclick="showDebug('page')">Page</th> + <td id="page" style="display:none"> + <debug:attributes scope="page" /> + </td> + </tr> + <tr> + <th onclick="showDebug('application')">Application</th> + <td id="application" style="display:none"> + <debug:attributes scope="application" /> + </td> + </tr> + <tr> + <th onclick="showDebug('headers')">Request headers</th> + <td id="headers" style="display:none"> + <debug:headers /> + </td> + </tr> + </table> + </div> +</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docbutton.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docbutton.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docbutton.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,24 +0,0 @@ -<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"> - - - <jsp:directive.attribute name="type" required="true" /> - <jsp:directive.attribute name="href" required="true" /> - <jsp:directive.attribute name="disabled" required="false" type="java.lang.Boolean" /> - - - <c:set var="message"><fmt:message key="btn.${type}" /></c:set> - - <c:choose> - <c:when test="${disabled}"> - <img src="${pageContext.request.contextPath}/docroot/img/btn-${type}_false.gif" alt="${message}" title="${message}"/> - </c:when> - <c:otherwise> - <a href="${href}&amp;page=full" title="${message}" target="_blank"> - <img src="${pageContext.request.contextPath}/docroot/img/btn-${type}.gif" alt="${message}" /> - </a> - </c:otherwise> - </c:choose> - -</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docframe.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docframe.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docframe.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,19 +0,0 @@ -<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"> - <jsp:directive.attribute name="width" required="false" /> - <jsp:directive.attribute name="height" required="false" /> - <jsp:directive.attribute name="doc" required="true" /> - <jsp:directive.attribute name="id" required="false" /> - <c:choose> - <c:when test="${!empty(doc)}"> - <iframe src="${jspContext.request.contextPath}/docs/pdf/${doc}" width="${width}" height="${height}" id="${id}"> - <!-- a --> - </iframe> - </c:when> - <c:otherwise> - <![CDATA[ <!-- doc is empty --> ]]> - </c:otherwise> - </c:choose> -</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docprintbutton.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docprintbutton.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docprintbutton.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,13 +0,0 @@ -<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"> - - - <jsp:directive.attribute name="href" required="true" /> - - <c:set var="message"><fmt:message key="btn.stampa" /></c:set> - - <a href="${href}&amp;page=full&amp;print=print" title="${message}" target="_blank"> - <img src="${pageContext.request.contextPath}/docroot/img/btn-stampa.gif" alt="${message}" /> - </a> -</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docsvg.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docsvg.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/docsvg.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,13 +0,0 @@ -<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"> - - <jsp:directive.attribute name="modello" required="true" /> - - <object class="svg" data="${jspContext.request.contextPath}/docs/svg/ES_${prodotto.seriemodello.id}.svg" type="image/svg+xml"> - <!-- <embed src="${jspContext.request.contextPath}/docs/svg/ES_${prodotto.seriemodello.id}.svg" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" /> --> - </object> - - - -</jsp:root> Deleted: tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/input.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/src/main/resources/META-INF/tags/ou/input.tag 2007-02-14 21:38:49 UTC (rev 259) @@ -1,131 +0,0 @@ -<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:ou="http://openutils.sourceforge.net/openutils-tags-spring" - xmlns:elx="http://openutils.sourceforge.net/openutils-tags-elx"> - <jsp:directive.attribute name="path" required="true" /> - <jsp:directive.attribute name="name" required="false" /> - <jsp:directive.attribute name="maxlength" required="false" type="java.lang.Integer" /> - <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="bare" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="type" required="false" /> - <jsp:directive.attribute name="nobind" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="style" required="false" /> - <jsp:directive.attribute name="onkeypress" required="false" /> - <jsp:directive.attribute name="onkeydown" required="false" /> - <jsp:directive.attribute name="onkeyup" required="false" /> - <jsp:directive.attribute name="onchange" required="false" /> - <jsp:directive.attribute name="cssclass" required="false" /> - <jsp:directive.attribute name="key" required="false" /> - <jsp:directive.attribute name="onblur" 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:if test="${empty(name)}"> - <c:set var="name">${su:substringAfter(path, ".")}</c:set> - </c:if> - <c:if test="${empty(maxlength)}"> - <c:set var="maxlength">30</c:set> - </c:if> - <c:if test="${type == 'key' || type == 'keyshow'}"> - <c:choose> - <c:when test="${type == 'key' and !empty(status.value)}"> - <c:set var="type" value="hidden" /> - </c:when> - <c:when test="${type == 'keyshow' and !empty(status.value)}"> - <c:set var="type" value="text" /> - <c:set var="readonly" value="${true}" /> - </c:when> - <c:otherwise> - <c:set var="type" value="text" /> - </c:otherwise> - </c:choose> - </c:if> - <c:if test="${type == 'date'}"> - <c:set var="type" value="text" /> - <c:set var="datepicker" value="${true}" /> - </c:if> - <c:if test="${maxlength ge 256}"> - <c:set var="type" value="textarea" /> - </c:if> - <c:set var="divclass"> - <jsp:text>formelement formelement${type}</jsp:text> - </c:set> - <c:set var="cssclass"> - <jsp:text>${type} ${cssclass}</jsp:text> - <c:if test="${readonly}">${elx:space()}readonly</c:if> - </c:set> - <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> - <!-- stampa campi --> - <c:choose> - <c:when test="${!nobind}"> - <spring:bind path="${path}"> - <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="${status.value}" /> - </c:when> - <c:otherwise> - <div class="${divclass}"> - <label for="${name}">${labelmsg}:</label> - <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}" /> - <c:if test="${datepicker}"> - <a href="javascript:showCal('divdata${name}','${name}')" title="seleziona" class="calbtn"> - <span>C</span> - </a> - <div class="calendar" id="divdata${name}" style="display:none"><!-- --></div> - <!--[if gte IE 5.5]> - <iframe id='divdata${name}iframe' class='calendarIframe' src='javascript:false;' frameBorder='0' - scrolling='no' - style="display:none;filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"><!-- x --></iframe> - <![endif]--> - <script type="text/javascript">createCalendar('${status.value}', 'divdata${name}', '${name}')</script> - </c:if> - <div class="clear"><!-- --></div> - </div> - </c:otherwise> - </c:choose> - </spring:bind> - </c:when> - <c:otherwise><!-- no spring binding --> - <c:choose> - <c:when test="${bare}"> - <ou:txtinput type="... [truncated message content] |
From: <fg...@us...> - 2007-02-14 21:38:22
|
Revision: 258 http://svn.sourceforge.net/openutils/?rev=258&view=rev Author: fgiust Date: 2007-02-14 13:38:22 -0800 (Wed, 14 Feb 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-tags-spring-0.3 Modified Paths: -------------- trunk/openutils-tags-spring/pom.xml Modified: trunk/openutils-tags-spring/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-02-14 21:15:50 UTC (rev 257) +++ trunk/openutils-tags-spring/pom.xml 2007-02-14 21:38:22 UTC (rev 258) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-tags-spring</artifactId> <name>openutils tags for spring MVC</name> - <version>1.0-SNAPSHOT</version> + <version>0.3</version> <description /> <dependencies> <dependency> @@ -76,4 +76,10 @@ <scope>test</scope> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-tags-spring-0.3</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-14 21:15:50
|
Revision: 257 http://svn.sourceforge.net/openutils/?rev=257&view=rev Author: fgiust Date: 2007-02-14 13:15:50 -0800 (Wed, 14 Feb 2007) Log Message: ----------- fix debug when no session is available, fix label mode in input tag Modified Paths: -------------- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag Modified: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java =================================================================== --- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java 2007-02-14 17:34:52 UTC (rev 256) +++ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java 2007-02-14 21:15:50 UTC (rev 257) @@ -91,19 +91,25 @@ { HashMap map = new HashMap(); - - Enumeration enm = pageContext.getAttributeNamesInScope(scope); - - while (enm.hasMoreElements()) + try { - String key = enm.nextElement().toString(); + Enumeration enm = pageContext.getAttributeNamesInScope(scope); - if (!(scope == PageContext.PAGE_SCOPE && key.startsWith("javax.servlet"))) + while (enm.hasMoreElements()) { - Object value = pageContext.getAttribute(key, scope); - map.put(key, value); + String key = enm.nextElement().toString(); + + if (!(scope == PageContext.PAGE_SCOPE && key.startsWith("javax.servlet"))) + { + Object value = pageContext.getAttribute(key, scope); + map.put(key, value); + } } } + catch (IllegalStateException e) + { + // ignore, no attributes available + } setOutputClassName(true); setDebugMap(map); 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-14 17:34:52 UTC (rev 256) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-14 21:15:50 UTC (rev 257) @@ -54,7 +54,7 @@ <c:set var="type" value="textarea" /> </c:if> <c:if test="${type eq 'label'}"> - <c:set var="nobind" value="true" /> + <c:set var="nobind" value="${true}" /> </c:if> <c:set var="divclass"> <jsp:text>formelement formelement${type}</jsp:text> @@ -91,7 +91,7 @@ </c:when> <c:otherwise> <div class="${divclass}"> - <label for="${name}">${labelmsg}:</label> + <label for="${name}">${labelmsg}</label> <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}" @@ -122,16 +122,16 @@ onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}" /> </c:when> - <c:when test="${label}"> + <c:when test="${type == 'label'}"> <div class="${divclass}"> - <label for="${name}">${labelmsg}:</label> + <label for="${name}">${labelmsg}</label> <span class="text">${status.value}</span> <div class="clear"><!-- --></div> </div> </c:when> <c:otherwise> <div class="${divclass}"> - <label for="${name}">${labelmsg}:</label> + <label for="${name}">${labelmsg}</label> <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}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-14 17:34:57
|
Revision: 256 http://svn.sourceforge.net/openutils/?rev=256&view=rev Author: fgiust Date: 2007-02-14 09:34:52 -0800 (Wed, 14 Feb 2007) Log Message: ----------- support for "label" input type Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag Removed Paths: ------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/text.tag Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld 2007-02-14 00:06:54 UTC (rev 255) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld 2007-02-14 17:34:52 UTC (rev 256) @@ -55,10 +55,6 @@ <path>/META-INF/tags/ou/tablelang.tag</path> </tag-file> <tag-file> - <name>text</name> - <path>/META-INF/tags/ou/text.tag</path> - </tag-file> - <tag-file> <name>txtinput</name> <path>/META-INF/tags/ou/txtinput.tag</path> </tag-file> 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-14 00:06:54 UTC (rev 255) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-14 17:34:52 UTC (rev 256) @@ -53,6 +53,9 @@ <c:if test="${maxlength ge 256}"> <c:set var="type" value="textarea" /> </c:if> + <c:if test="${type eq 'label'}"> + <c:set var="nobind" value="true" /> + </c:if> <c:set var="divclass"> <jsp:text>formelement formelement${type}</jsp:text> </c:set> @@ -119,6 +122,13 @@ onkeypress="${onkeypress}" onkeydown="${onkeydown}" onkeyup="${onkeyup}" onchange="${onchange}" onblur="${onblur}" /> </c:when> + <c:when test="${label}"> + <div class="${divclass}"> + <label for="${name}">${labelmsg}:</label> + <span class="text">${status.value}</span> + <div class="clear"><!-- --></div> + </div> + </c:when> <c:otherwise> <div class="${divclass}"> <label for="${name}">${labelmsg}:</label> Deleted: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/text.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/text.tag 2007-02-14 00:06:54 UTC (rev 255) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/text.tag 2007-02-14 17:34:52 UTC (rev 256) @@ -1,54 +0,0 @@ -<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:ou="http://openutils.sourceforge.net/openutils-tags-spring"> - - <jsp:directive.attribute name="path" required="true" /> - <jsp:directive.attribute name="name" required="false" /> - <jsp:directive.attribute name="maxlength" required="false" type="java.lang.Integer" /> - <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="type" required="false" /> - <jsp:directive.attribute name="label" required="false" type="java.lang.String" /> - - <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="${empty(maxlength)}"> - <c:set var="maxlength">30</c:set> - </c:if> - <c:if test="${type == 'key' and !empty(status.value)}"> - <c:set var="type">hidden</c:set> - </c:if> - <c:if test="${type == 'keyshow' and !empty(status.value)}"> - <c:set var="readonly" value="${true}" /> - </c:if> - - <c:choose> - <c:when test="${empty(label)}"> - <c:set var="labelmsg"><fmt:message key="${path}" /></c:set> - </c:when> - <c:otherwise> - <c:set var="labelmsg">${label}</c:set> - </c:otherwise> - </c:choose> - - - <c:choose> - <c:when test="${type == 'hidden'}"> - <input type="hidden" name="${name}" id="${name}" value="${status.value}" /> - </c:when> - <c:otherwise> - <div class="${divclass}"> - <label for="${name}">${labelmsg}:</label> - - <ou:txtinput type="text" name="${name}" value="${status.value}" cssclass="text" maxlength="${maxlength}" readonly="${readonly}" disabled="${disabled}"/> - - <div class="clear"><!-- --></div> - </div> - </c:otherwise> - </c:choose> - </spring:bind> - -</jsp:root> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-14 00:06:53
|
Revision: 255 http://svn.sourceforge.net/openutils/?rev=255&view=rev Author: fgiust Date: 2007-02-13 16:06:54 -0800 (Tue, 13 Feb 2007) Log Message: ----------- handle nulls Modified Paths: -------------- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java Modified: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java 2007-02-13 21:39:25 UTC (rev 254) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java 2007-02-14 00:06:54 UTC (rev 255) @@ -22,6 +22,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.Resource; +import org.springframework.dao.DataIntegrityViolationException; import org.springframework.jdbc.BadSqlGrammarException; import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; @@ -129,10 +130,10 @@ log.debug("Table: {}, Columns: {}", tableName, columns); - String checkStatement = con.getCheckQuery(); - String insertStatement = con.getInsertQuery(); + String checkStatement = StringUtils.remove(StringUtils.trim(con.getCheckQuery()), "\n"); + String insertStatement = StringUtils.remove(StringUtils.trim(con.getInsertQuery()), "\n"); - processRecords(sheet, columns, checkStatement, insertStatement, dataSource); + processRecords(sheet, columns, checkStatement, insertStatement, dataSource, tableName); } /** @@ -142,16 +143,16 @@ * @param insertStatement */ private void processRecords(HSSFSheet sheet, List<String> columns, String checkStatement, String insertStatement, - DataSource dataSource) + DataSource dataSource, String tableName) { SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); int checkNum = StringUtils.countMatches(checkStatement, "?"); int insertNum = StringUtils.countMatches(insertStatement, "?"); HSSFRow row; - for (short u = 1; u <= sheet.getLastRowNum(); u++) + for (short rowNum = 1; rowNum <= sheet.getLastRowNum(); rowNum++) { - row = sheet.getRow(u); + row = sheet.getRow(rowNum); if (row == null) { return; @@ -191,6 +192,12 @@ { value = StringUtils.EMPTY; } + + if ("<NULL>".equals(value)) + { + value = null; + } + values.add(value); } @@ -220,7 +227,24 @@ Object[] insertParams = ArrayUtils.subarray(values.toArray(), 0, insertNum); log.debug("Missing record with key {}; inserting {}", ArrayUtils.toString(checkParams), ArrayUtils .toString(insertParams)); - jdbcTemplate.update(insertStatement, insertParams); + + try + { + jdbcTemplate.update(insertStatement, insertParams); + } + catch (DataIntegrityViolationException bsge) + { + log + .error( + "Error executing insert, record at {}:{} will be skipped. Query in error: '{}', values: {}. Error message: {}", + new Object[]{ + tableName, + rowNum, + insertStatement, + ArrayUtils.toString(insertParams), + bsge.getMessage() }); + return; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 21:39:25
|
Revision: 254 http://svn.sourceforge.net/openutils/?rev=254&view=rev Author: fgiust Date: 2007-02-13 13:39:25 -0800 (Tue, 13 Feb 2007) Log Message: ----------- cleanup of useless tags + new keytext input type Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag Removed Paths: ------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docbutton.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docframe.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docprintbutton.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docsvg.tag Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld 2007-02-13 21:21:37 UTC (rev 253) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-spring.tld 2007-02-13 21:39:25 UTC (rev 254) @@ -27,30 +27,10 @@ <path>/META-INF/tags/ou/date.tag</path> </tag-file> <tag-file> - <name>daterange</name> - <path>/META-INF/tags/ou/daterange.tag</path> - </tag-file> - <tag-file> <name>debug</name> <path>/META-INF/tags/ou/debug.tag</path> </tag-file> <tag-file> - <name>docbutton</name> - <path>/META-INF/tags/ou/docbutton.tag</path> - </tag-file> - <tag-file> - <name>docframe</name> - <path>/META-INF/tags/ou/docframe.tag</path> - </tag-file> - <tag-file> - <name>docprintbutton</name> - <path>/META-INF/tags/ou/docprintbutton.tag</path> - </tag-file> - <tag-file> - <name>docsvg</name> - <path>/META-INF/tags/ou/docsvg.tag</path> - </tag-file> - <tag-file> <name>errorbox</name> <path>/META-INF/tags/ou/errorbox.tag</path> </tag-file> @@ -67,10 +47,6 @@ <path>/META-INF/tags/ou/messages.tag</path> </tag-file> <tag-file> - <name>na</name> - <path>/META-INF/tags/ou/na.tag</path> - </tag-file> - <tag-file> <name>select</name> <path>/META-INF/tags/ou/select.tag</path> </tag-file> Deleted: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docbutton.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docbutton.tag 2007-02-13 21:21:37 UTC (rev 253) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docbutton.tag 2007-02-13 21:39:25 UTC (rev 254) @@ -1,24 +0,0 @@ -<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"> - - - <jsp:directive.attribute name="type" required="true" /> - <jsp:directive.attribute name="href" required="true" /> - <jsp:directive.attribute name="disabled" required="false" type="java.lang.Boolean" /> - - - <c:set var="message"><fmt:message key="btn.${type}" /></c:set> - - <c:choose> - <c:when test="${disabled}"> - <img src="${pageContext.request.contextPath}/docroot/img/btn-${type}_false.gif" alt="${message}" title="${message}"/> - </c:when> - <c:otherwise> - <a href="${href}&amp;page=full" title="${message}" target="_blank"> - <img src="${pageContext.request.contextPath}/docroot/img/btn-${type}.gif" alt="${message}" /> - </a> - </c:otherwise> - </c:choose> - -</jsp:root> Deleted: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docframe.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docframe.tag 2007-02-13 21:21:37 UTC (rev 253) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docframe.tag 2007-02-13 21:39:25 UTC (rev 254) @@ -1,19 +0,0 @@ -<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"> - <jsp:directive.attribute name="width" required="false" /> - <jsp:directive.attribute name="height" required="false" /> - <jsp:directive.attribute name="doc" required="true" /> - <jsp:directive.attribute name="id" required="false" /> - <c:choose> - <c:when test="${!empty(doc)}"> - <iframe src="${jspContext.request.contextPath}/docs/pdf/${doc}" width="${width}" height="${height}" id="${id}"> - <!-- a --> - </iframe> - </c:when> - <c:otherwise> - <![CDATA[ <!-- doc is empty --> ]]> - </c:otherwise> - </c:choose> -</jsp:root> Deleted: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docprintbutton.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docprintbutton.tag 2007-02-13 21:21:37 UTC (rev 253) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docprintbutton.tag 2007-02-13 21:39:25 UTC (rev 254) @@ -1,13 +0,0 @@ -<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"> - - - <jsp:directive.attribute name="href" required="true" /> - - <c:set var="message"><fmt:message key="btn.stampa" /></c:set> - - <a href="${href}&amp;page=full&amp;print=print" title="${message}" target="_blank"> - <img src="${pageContext.request.contextPath}/docroot/img/btn-stampa.gif" alt="${message}" /> - </a> -</jsp:root> Deleted: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docsvg.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docsvg.tag 2007-02-13 21:21:37 UTC (rev 253) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/docsvg.tag 2007-02-13 21:39:25 UTC (rev 254) @@ -1,13 +0,0 @@ -<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"> - - <jsp:directive.attribute name="modello" required="true" /> - - <object class="svg" data="${jspContext.request.contextPath}/docs/svg/ES_${prodotto.seriemodello.id}.svg" type="image/svg+xml"> - <!-- <embed src="${jspContext.request.contextPath}/docs/svg/ES_${prodotto.seriemodello.id}.svg" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" /> --> - </object> - - - -</jsp:root> 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-13 21:21:37 UTC (rev 253) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-13 21:39:25 UTC (rev 254) @@ -29,10 +29,10 @@ <c:if test="${empty(maxlength)}"> <c:set var="maxlength">30</c:set> </c:if> - <c:if test="${type == 'key' || type == 'keyshow'}"> + <c:if test="${type == 'key' || type == 'keyshow' || type == 'keytext'}"> <c:choose> <c:when test="${type == 'keytext' and empty(status.value)}"> - <c:set var="type" value="hidden" /> + <c:set var="donothing" value="${true}" /> </c:when> <c:when test="${type == 'key' and !empty(status.value)}"> <c:set var="type" value="hidden" /> @@ -72,6 +72,7 @@ </c:choose> <!-- stampa campi --> <c:choose> + <c:when test="${donothing}"><!-- don't print anything --></c:when> <c:when test="${!nobind}"> <spring:bind path="${path}"> <c:set var="divclass"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 21:21:39
|
Revision: 253 http://svn.sourceforge.net/openutils/?rev=253&view=rev Author: fgiust Date: 2007-02-13 13:21:37 -0800 (Tue, 13 Feb 2007) Log Message: ----------- adding debug tags Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/debug.tag Added Paths: ----------- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/BaseDebugTag.java trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugExecutionTag.java trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugHeadersTag.java trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugParametersTag.java trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-debug.tld Added: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/BaseDebugTag.java =================================================================== --- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/BaseDebugTag.java (rev 0) +++ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/BaseDebugTag.java 2007-02-13 21:21:37 UTC (rev 253) @@ -0,0 +1,214 @@ +package it.openutils.web.tag.debug; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.servlet.jsp.JspException; +import javax.servlet.jsp.tagext.TagSupport; + +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.ObjectUtils; +import org.apache.commons.lang.StringUtils; + + +/** + * @author fgiust + * @version $Revision$ ($Author$) + */ +public class BaseDebugTag extends TagSupport +{ + + /** + * Stable <code>serialVersionUID</code> + */ + private static final long serialVersionUID = 222; + + /** + * codice html HTML_TABLE_START_4COL + */ + protected static final String HTML_TABLE_START_4COL = "<table><thead><tr>" + + "<th>key</th><th>value</th><th>class</th><th>size</th>" + + "</tr></thead><tbody>"; + + /** + * codice html HTML_TABLE_START_3COL + */ + protected static final String HTML_TABLE_START_3COL = "<table><thead><tr>" + + "<th>key</th><th>value</th><th>class</th>" + + "</tr></thead><tbody>"; + + /** + * codice html HTML_TABLE_START_2COL + */ + protected static final String HTML_TABLE_START_2COL = "<table><thead><tr>" + + "<th>key</th><th>value</th>" + + "</tr></thead><tbody>"; + + /** + * codice html HTML_TABLE_END + */ + protected static final String HTML_TABLE_END = "</tbody></table>"; + + /** + * Map contenente i valori per il debug + */ + private Map debugMap; + + /** + * write ClassName In Table? + */ + private boolean outputClassName; + + /** + * Setta la map con i valori da mostrare nel debug + * @param debug map con i valori da mostrare nel debug + */ + protected void setDebugMap(Map debug) + { + debugMap = debug; + } + + /** + * Scrivi il nome della classe nel debug + * @param writeClassNameInTable <code>true</code> per far si che il nome della classe appaia nel debug + */ + public void setOutputClassName(boolean writeClassNameInTable) + { + outputClassName = writeClassNameInTable; + } + + /** + * doEndTag. Scrive come tabella html la Map settata col metodo setDebugMap() + * @return int + * @throws JspException in caso di eccezioni nella scrittura sull'out + * @see javax.servlet.jsp.tagext.Tag#doEndTag() + */ + @Override + public int doEndTag() throws JspException + { + + if (debugMap.size() > 0) + { + StringBuffer buffer = new StringBuffer(debugMap.size() * 200); + + if (outputClassName) + { + buffer.append(HTML_TABLE_START_3COL); + } + else + { + buffer.append(HTML_TABLE_START_2COL); + } + + Set set = debugMap.entrySet(); + Iterator iterator = set.iterator(); + int totalSize = 0; + + while (iterator.hasNext()) + { + Map.Entry entry = (Map.Entry) iterator.next(); + + Object value = entry.getValue(); + String key = (String) entry.getKey(); + + buffer.append("<tr>"); + buffer.append("<td>" + key + "</td>"); + buffer.append("<td>" + escapeXml(value) + "</td>"); + if (outputClassName) + { + if (value != null) + { + buffer.append("<td>" + value.getClass().getName() + "</td>"); + } + else + { + buffer.append("<td>null</td>"); + } + } + + buffer.append("</tr>"); + } + if (totalSize > 0) + { + buffer.append("<tr><td colspan=\"3\"><strong>total size (solo portlet webbank)</strong></td><td>" + + totalSize + + " byte</td></tr>"); + } + + buffer.append(HTML_TABLE_END); + writeToOut(buffer); + } + else + { + writeToOut("nessun valore"); + } + + return super.doEndTag(); + } + + /** + * trasforma tutte le occorrenze di < in &lt; + * @param string stringa di cui fare l'escape - il metodo accetta un Object per comodit� (utilizza il toString() + * dell'Object) + * @return String + */ + private String escapeXml(Object string) + { + if (string == null) + { + return null; + } + + String stringed; + + // supporto per array di oggetti + if (string.getClass().isArray()) + { + stringed = ArrayUtils.toString(string); + } + // supporto per iterators + else if (string instanceof Iterator) + { + List list = new ArrayList(); + Iterator iterator = (Iterator) string; + while (iterator.hasNext()) + { + list.add(iterator.next()); + } + + stringed = ArrayUtils.toString(list.toArray()); + } + else + { + stringed = string.toString(); + } + + return StringUtils.replace(stringed, "<", "<"); + } + + /** + * metodo di utility per scrivere una semplice stringa sul JspWriter + * @param string stringa da scrivere + * @throws JspException nel caso si verifichi una IOException nella scrittura + */ + protected void writeToOut(Object string) throws JspException + { + if (string != null) + { + try + { + pageContext.getOut().write(ObjectUtils.toString(string)); + } + catch (IOException e) + { + throw new JspException("errore nella scrittura dell'output. String=[" + string + "]"); + } + } + + } + +} \ No newline at end of file Property changes on: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/BaseDebugTag.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java =================================================================== --- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java (rev 0) +++ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java 2007-02-13 21:21:37 UTC (rev 253) @@ -0,0 +1,114 @@ +package it.openutils.web.tag.debug; + +import java.util.Enumeration; +import java.util.HashMap; + +import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + + +/** + * @author fgiust + * @version $Revision$ ($Author$) + */ +public class DebugAttributesTag extends BaseDebugTag +{ + + /** + * Stable <code>serialVersionUID</code> + */ + private static final long serialVersionUID = 222; + + /** + * riferimento al Logger + */ + private static Log log = LogFactory.getLog(DebugAttributesTag.class); + + /** + * Scope. Pu� assumere i valori: + * <ul> + * <li>PageContext.PAGE_SCOPE</li> + * <li>PageContext.REQUEST_SCOPE</li> + * <li>PageContext.SESSION_SCOPE</li> + * <li>PageContext.APPLICATION_SCOPE</li> + * </ul> + * Corrispondenti alle stringhe settate tramite l'attributo "scope" del tag: + * <ul> + * <li>page</li> + * <li>request</li> + * <li>session</li> + * <li>application</li> + * </ul> + */ + private int scope = PageContext.PAGE_SCOPE; + + /** + * Setta lo scope in cui recuperare la collezione su cui iterare + * @param scopeString Scope dell'oggetto collection + * @throws JspException se il valore passato non � tra: "page", "request", "session", "application" + */ + public void setScope(String scopeString) throws JspException + { + + if (scopeString.equalsIgnoreCase("page")) + { + scope = PageContext.PAGE_SCOPE; + } + else if (scopeString.equalsIgnoreCase("request")) + { + scope = PageContext.REQUEST_SCOPE; + } + else if (scopeString.equalsIgnoreCase("session")) + { + scope = PageContext.SESSION_SCOPE; + } + else if (scopeString.equalsIgnoreCase("application")) + { + scope = PageContext.APPLICATION_SCOPE; + } + else + { + log.error("Attributo \"scope\" non valido. Valore fornito= [" + + scopeString + + "]; valori ammessi: page, request, session, application"); + throw new JspException("Attributo \"scope\" non valido. Valore fornito= [" + + scopeString + + "]; valori ammessi: page, request, session, application"); + } + } + + /** + * crea l'HashMap che evrr� stampata nel metodo doEndTag() + * @return int + * @throws JspException eccezione generica + * @see javax.servlet.jsp.tagext.Tag#doStartTag() + */ + @Override + public int doStartTag() throws JspException + { + + HashMap map = new HashMap(); + + Enumeration enm = pageContext.getAttributeNamesInScope(scope); + + while (enm.hasMoreElements()) + { + String key = enm.nextElement().toString(); + + if (!(scope == PageContext.PAGE_SCOPE && key.startsWith("javax.servlet"))) + { + Object value = pageContext.getAttribute(key, scope); + map.put(key, value); + } + } + + setOutputClassName(true); + setDebugMap(map); + + return super.doStartTag(); + } + +} \ No newline at end of file Property changes on: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugAttributesTag.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugExecutionTag.java =================================================================== --- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugExecutionTag.java (rev 0) +++ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugExecutionTag.java 2007-02-13 21:21:37 UTC (rev 253) @@ -0,0 +1,43 @@ +package it.openutils.web.tag.debug; + +import java.util.HashMap; + +import javax.servlet.ServletRequest; +import javax.servlet.jsp.JspException; + + +/** + * @author fgiust + * @version $Revision$ ($Author$) + */ +public class DebugExecutionTag extends BaseDebugTag +{ + + /** + * Stable <code>serialVersionUID</code> + */ + private static final long serialVersionUID = 222; + + /** + * crea l'HashMap che verr� stampata nel metodo doEndTag() + * @return int + * @throws JspException eccezione generica + * @see javax.servlet.jsp.tagext.Tag#doStartTag() + */ + @Override + public int doStartTag() throws JspException + { + + HashMap map = new HashMap(); + + ServletRequest request = pageContext.getRequest(); + + map.put("action", request.getAttribute("")); + + setOutputClassName(false); + setDebugMap(map); + + return super.doStartTag(); + } + +} \ No newline at end of file Property changes on: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugExecutionTag.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugHeadersTag.java =================================================================== --- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugHeadersTag.java (rev 0) +++ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugHeadersTag.java 2007-02-13 21:21:37 UTC (rev 253) @@ -0,0 +1,73 @@ +package it.openutils.web.tag.debug; + +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Enumeration; +import java.util.HashMap; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.jsp.JspException; + + +/** + * @author fgiust + * @version $Revision$ ($Author$) + */ +public class DebugHeadersTag extends BaseDebugTag +{ + + /** + * Stable <code>serialVersionUID</code> + */ + private static final long serialVersionUID = 222; + + /** + * crea l'HashMap che evrr� stampata nel metodo doEndTag() + * @return int + * @throws JspException eccezione generica + * @see javax.servlet.jsp.tagext.Tag#doStartTag() + */ + @Override + public int doStartTag() throws JspException + { + + HashMap map = new HashMap(); + + HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); + Enumeration enm = request.getHeaderNames(); + + while (enm.hasMoreElements()) + { + String key = enm.nextElement().toString(); + Object value = request.getHeader(key); + map.put(key, value); + } + + String remoteHost = request.getRemoteHost(); + map.put("getRemoteHost", remoteHost); + map.put("getRemoteUser", request.getRemoteUser()); + map.put("getCharacterEncoding", request.getCharacterEncoding()); + map.put("getAuthType", request.getAuthType()); + map.put("getAuthType", request.getAuthType()); + map.put("getPathInfo", request.getPathInfo()); + map.put("getPathTranslated", request.getPathTranslated()); + map.put("getMethod", request.getMethod()); + + if (remoteHost != null) + { + try + { + map.put("getHostName(remoteHost)", InetAddress.getByName(remoteHost).getHostName()); + } + catch (UnknownHostException e) + { + map.put("getHostName(remoteHost)", "UnknownHostException!"); + } + } + + setOutputClassName(false); + setDebugMap(map); + + return super.doStartTag(); + } +} \ No newline at end of file Property changes on: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugHeadersTag.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugParametersTag.java =================================================================== --- trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugParametersTag.java (rev 0) +++ trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugParametersTag.java 2007-02-13 21:21:37 UTC (rev 253) @@ -0,0 +1,50 @@ +package it.openutils.web.tag.debug; + +import java.util.Enumeration; +import java.util.HashMap; + +import javax.servlet.ServletRequest; +import javax.servlet.jsp.JspException; + + +/** + * @author fgiust + * @version $Revision$ ($Author$) + */ +public class DebugParametersTag extends BaseDebugTag +{ + + /** + * Stable <code>serialVersionUID</code> + */ + private static final long serialVersionUID = 222; + + /** + * crea l'HashMap che verr� stampata nel metodo doEndTag() + * @return int + * @throws JspException eccezione generica + * @see javax.servlet.jsp.tagext.Tag#doStartTag() + */ + @Override + public int doStartTag() throws JspException + { + + HashMap map = new HashMap(); + + ServletRequest request = pageContext.getRequest(); + Enumeration enm = request.getParameterNames(); + + while (enm.hasMoreElements()) + { + String key = enm.nextElement().toString(); + Object value = request.getParameter(key); + map.put(key, value); + } + + setOutputClassName(false); + setDebugMap(map); + + return super.doStartTag(); + } + +} Property changes on: trunk/openutils-tags-spring/src/main/java/it/openutils/web/tag/debug/DebugParametersTag.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-debug.tld =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-debug.tld (rev 0) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-debug.tld 2007-02-13 21:21:37 UTC (rev 253) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> +<taglib> + <tlib-version>1.1</tlib-version> + <jsp-version>1.2</jsp-version> + <short-name>debug</short-name> + <uri>http://openutils.sourceforge.net/openutils-tags-debug</uri> + <description>Debug tag library</description> + <tag> + <name>attributes</name> + <tag-class>it.openutils.web.tag.debug.DebugAttributesTag</tag-class> + <body-content>empty</body-content> + <attribute> + <name>scope</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>parameters</name> + <tag-class>it.openutils.web.tag.debug.DebugParametersTag</tag-class> + <body-content>empty</body-content> + </tag> + <tag> + <name>execution</name> + <tag-class>it.openutils.web.tag.debug.DebugExecutionTag</tag-class> + <body-content>empty</body-content> + </tag> + <tag> + <name>headers</name> + <tag-class>it.openutils.web.tag.debug.DebugHeadersTag</tag-class> + <body-content>empty</body-content> + </tag> +</taglib> \ No newline at end of file Property changes on: trunk/openutils-tags-spring/src/main/resources/META-INF/openutils-tags-debug.tld ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/debug.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/debug.tag 2007-02-13 21:21:00 UTC (rev 252) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/debug.tag 2007-02-13 21:21:37 UTC (rev 253) @@ -1,7 +1,6 @@ <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:debug="urn:jsptld:debug" xmlns:c="http://java.sun.com/jsp/jstl/core"> - - <script type="text/javascript"> + xmlns:debug="http://openutils.sourceforge.net/openutils-tags-debug" xmlns:c="http://java.sun.com/jsp/jstl/core"> + <script type="text/javascript"> <![CDATA[ function showDebug(pId) { lDebugDiv = document.getElementById(pId); @@ -14,34 +13,48 @@ } } ]]> - </script> - <div class="debugtabs"><a href="javascript:showDebug('debug')">&raquo; debug</a></div> - <div id="debug" class="debug" style="display:none"> + </script> + <div class="debugtabs"> + <a href="javascript:showDebug('debug')">&raquo; debug</a> + </div> + <div id="debug" class="debug" style="display:none"> <table> - <tr> - <th onclick="showDebug('parameters')">Parameters</th> - <td id="parameters" style="display:none"><debug:parameters /></td> - </tr> - <tr> - <th onclick="showDebug('request')">Request</th> - <td id="request" style="display:none"><debug:attributes scope="request" /></td> - </tr> - <tr> - <th onclick="showDebug('session')">Session</th> - <td id="session" style="display:none"><debug:attributes scope="session" /></td> - </tr> - <tr> - <th onclick="showDebug('page')">Page</th> - <td id="page" style="display:none"><debug:attributes scope="page" /></td> - </tr> - <tr> - <th onclick="showDebug('application')">Application</th> - <td id="application" style="display:none"><debug:attributes scope="application" /></td> - </tr> - <tr> - <th onclick="showDebug('headers')">Request headers</th> - <td id="headers" style="display:none"><debug:headers /></td> - </tr> + <tr> + <th onclick="showDebug('parameters')">Parameters</th> + <td id="parameters" style="display:none"> + <debug:parameters /> + </td> + </tr> + <tr> + <th onclick="showDebug('request')">Request</th> + <td id="request" style="display:none"> + <debug:attributes scope="request" /> + </td> + </tr> + <tr> + <th onclick="showDebug('session')">Session</th> + <td id="session" style="display:none"> + <debug:attributes scope="session" /> + </td> + </tr> + <tr> + <th onclick="showDebug('page')">Page</th> + <td id="page" style="display:none"> + <debug:attributes scope="page" /> + </td> + </tr> + <tr> + <th onclick="showDebug('application')">Application</th> + <td id="application" style="display:none"> + <debug:attributes scope="application" /> + </td> + </tr> + <tr> + <th onclick="showDebug('headers')">Request headers</th> + <td id="headers" style="display:none"> + <debug:headers /> + </td> + </tr> </table> - </div> + </div> </jsp:root> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 21:21:00
|
Revision: 252 http://svn.sourceforge.net/openutils/?rev=252&view=rev Author: fgiust Date: 2007-02-13 13:21:00 -0800 (Tue, 13 Feb 2007) Log Message: ----------- removing tag: since deploy doesn't work at the moment I'll wait in order to add more enhancements Removed Paths: ------------- tags/openutils-tags-spring-0.3/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 21:12:52
|
Revision: 251 http://svn.sourceforge.net/openutils/?rev=251&view=rev Author: fgiust Date: 2007-02-13 13:12:44 -0800 (Tue, 13 Feb 2007) Log Message: ----------- cleanup Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/checkbox.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/date.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/li.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/messages.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtinput.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtoption.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtselect.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txttextarea.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/url.tag Removed Paths: ------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/daterange.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/na.tag Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/checkbox.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/checkbox.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/checkbox.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -8,6 +8,10 @@ <jsp:directive.attribute name="bare" required="false" type="java.lang.Boolean" /> <jsp:directive.attribute name="multiline" required="false" type="java.lang.Boolean" /> <jsp:directive.attribute name="style" required="false" /> + + <jsp:scriptlet> + System.err.println("Warning ou:checkbox is deprecated, please use ou:input type=\"checkbox\" instead "); + </jsp:scriptlet> <spring:bind path="${path}"> <c:if test="${empty(name)}"> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/date.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/date.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/date.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -19,6 +19,10 @@ <jsp:directive.attribute name="label" required="false" type="java.lang.String" /> + <jsp:scriptlet> + System.err.println("Warning ou:date is deprecated, please use ou:input type=\"date\" instead "); + </jsp:scriptlet> + <c:if test="${empty(key)}"> <c:set var="key">${path}</c:set> </c:if> Deleted: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/daterange.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/daterange.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/daterange.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,30 +0,0 @@ -<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"> - <jsp:directive.attribute name="from" required="true" type="java.util.Date" /> - <jsp:directive.attribute name="to" required="true" type="java.util.Date" /> - <!-- elimina date anteriori al 1970 --> - <c:if test="${from.time le 0}"> - <c:remove var="from" /> - </c:if> - <c:if test="${to.time le 0}"> - <c:remove var="to" /> - </c:if> - <c:if test="${(from != null) or (to != null)}"> - <jsp:text> (</jsp:text> - <c:if test="${from != null}"> - <fmt:message key="daterange.from" /> - <jsp:text> </jsp:text> - <fmt:formatDate value="${from}" type="date" pattern="dd/MM/yyyy" /> - <c:if test="${to != null}"> - <jsp:text> </jsp:text> - </c:if> - </c:if> - - <c:if test="${to != null}"> - <fmt:message key="daterange.to" /> - <jsp:text> </jsp:text> - <fmt:formatDate value="${to}" type="date" pattern="dd/MM/yyyy" /> - </c:if> - <jsp:text>) </jsp:text> - </c:if> -</jsp:root> 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-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -31,10 +31,13 @@ </c:if> <c:if test="${type == 'key' || type == 'keyshow'}"> <c:choose> + <c:when test="${type == 'keytext' and empty(status.value)}"> + <c:set var="type" value="hidden" /> + </c:when> <c:when test="${type == 'key' and !empty(status.value)}"> <c:set var="type" value="hidden" /> </c:when> - <c:when test="${type == 'keyshow' and !empty(status.value)}"> + <c:when test="${(type == 'keyshow' and !empty(status.value)) or (type == 'keytext' and !empty(status.value))}"> <c:set var="type" value="text" /> <c:set var="readonly" value="${true}" /> </c:when> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/li.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/li.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/li.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,23 +1,24 @@ -<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:ou="http://openutils.sourceforge.net/openutils-tags-spring" xmlns:elx="http://openutils.sourceforge.net/openutils-tags-elx"> - <jsp:directive.attribute name="selected" required="false" /> - <jsp:directive.attribute name="href" required="true" /> - <jsp:directive.attribute name="text" required="true" /> - <jsp:directive.attribute name="title" required="false" /> - <c:choose> - <c:when test="${href eq selected}"> - <li id="current"> - <strong> - <a href="${href}" title="${title}">${text}</a> - </strong> - </li> - </c:when> - <c:otherwise> - <li> - <a href="${href}" title="${title}">${text}</a> - </li> - </c:otherwise> - </c:choose> +<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:ou="http://openutils.sourceforge.net/openutils-tags-spring" + xmlns:elx="http://openutils.sourceforge.net/openutils-tags-elx"> + <jsp:directive.attribute name="selected" required="false" /> + <jsp:directive.attribute name="href" required="true" /> + <jsp:directive.attribute name="text" required="true" /> + <jsp:directive.attribute name="title" required="false" /> + <c:choose> + <c:when test="${href eq selected}"> + <li id="current"> + <strong> + <a href="${href}" title="${title}">${text}</a> + </strong> + </li> + </c:when> + <c:otherwise> + <li> + <a href="${href}" title="${title}">${text}</a> + </li> + </c:otherwise> + </c:choose> </jsp:root> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/messages.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/messages.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/messages.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,30 +1,28 @@ -<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:su="http://openutils.sourceforge.net/openutils-tags-commonslang" - xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"> - - <c:if test="${not empty errors}"> - <div class="error"> - <ul> - <c:forEach var="msg" items="${errors}"> - <li><c:out value="${msg}" escapeXml="false" /></li> - </c:forEach> - </ul> - </div> - <c:remove var="errors" /> - </c:if> - - - <c:if test="${not empty messages}"> - <div class="message"> - <ul> - <c:forEach var="msg" items="${messages}"> - <li><c:out value="${msg}" escapeXml="false" /></li> - </c:forEach> - </ul> - </div> - <c:remove var="messages" /> - </c:if> - +<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:su="http://openutils.sourceforge.net/openutils-tags-commonslang" + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"> + <c:if test="${not empty errors}"> + <div class="error"> + <ul> + <c:forEach var="msg" items="${errors}"> + <li> + <c:out value="${msg}" escapeXml="false" /> + </li> + </c:forEach> + </ul> + </div> + <c:remove var="errors" /> + </c:if> + <c:if test="${not empty messages}"> + <div class="message"> + <ul> + <c:forEach var="msg" items="${messages}"> + <li> + <c:out value="${msg}" escapeXml="false" /> + </li> + </c:forEach> + </ul> + </div> + <c:remove var="messages" /> + </c:if> </jsp:root> Deleted: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/na.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/na.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/na.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,12 +0,0 @@ -<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"> - <c:set var="body"> - <jsp:doBody /> - </c:set> - <c:choose> - <c:when test="${!empty(body)}">${body}</c:when> - <c:otherwise>N/A</c:otherwise> - </c:choose> -</jsp:root> 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-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtinput.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,66 +1,92 @@ -<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"> - - - <jsp:directive.attribute name="name" required="true" /> - <jsp:directive.attribute name="value" required="true" /> - <jsp:directive.attribute name="type" required="false" /> - <jsp:directive.attribute name="cssclass" required="false" /> - <jsp:directive.attribute name="style" required="false" /> - <jsp:directive.attribute name="maxlength" required="false" /> - <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="checked" required="false" type="java.lang.Boolean"/> - <jsp:directive.attribute name="onkeypress" required="false" /> - <jsp:directive.attribute name="onkeydown" required="false" /> - <jsp:directive.attribute name="onkeyup" required="false" /> - <jsp:directive.attribute name="onchange" required="false" /> - <jsp:directive.attribute name="onblur" required="false" /> - <c:if test="${empty(type)}"> - <c:set var="type" value="text" /> - </c:if> - - <c:choose> - <c:when test="${type == 'textarea'}"><![CDATA[<textarea name="]]>${name}<![CDATA[" id="]]>${name}<![CDATA[" ]]></c:when> - <c:otherwise><![CDATA[<input name="]]>${name}<![CDATA[" id="]]>${name}<![CDATA[" type="]]>${type}<![CDATA["]]></c:otherwise> - </c:choose> - - <c:choose> - <c:when test="${type == 'checkbox'}"><![CDATA[ value="]]>true<![CDATA[" ]]></c:when> - <c:when test="${type == 'textarea'}"></c:when> - <c:otherwise><![CDATA[ value="]]>${value}<![CDATA[" ]]></c:otherwise> - </c:choose> - - - - <c:if test="${!empty(cssclass)}"><![CDATA[ class="]]>${cssclass}<![CDATA[" ]]></c:if> - <c:if test="${!empty(onkeypress)}"><![CDATA[ onkeypress="]]>${onkeypress}<![CDATA[" ]]></c:if> - <c:if test="${!empty(onkeydown)}"><![CDATA[ onkeydown="]]>${onkeydown}<![CDATA[" ]]></c:if> - <c:if test="${!empty(onkeyup)}"><![CDATA[ onkeydown="]]>${onkeyup}<![CDATA[" ]]></c:if> - <c:if test="${!empty(onchange)}"><![CDATA[ onchange="]]>${onchange}<![CDATA[" ]]></c:if> - <c:if test="${!empty(onblur)}"><![CDATA[ onblur="]]>${onblur}<![CDATA[" ]]></c:if> - <c:if test="${!empty(style)}"><![CDATA[ style="]]>${style}<![CDATA[" ]]></c:if> - <c:if test="${readonly}"><![CDATA[ readonly="readonly" ]]></c:if> - <c:if test="${disabled}"><![CDATA[ disabled="disabled" ]]></c:if> - <c:if test="${!empty(onkeypress) || !empty(onkeydown) || !empty(onkeyup) || !empty(onchange) || !empty(onblur)}"><![CDATA[ autocomplete="off" ]]></c:if> - - <c:choose> - <c:when test="${type == 'text'}"> - <c:if test="${!empty(maxlength)}"><![CDATA[ maxlength="]]>${maxlength}<![CDATA[" ]]></c:if> - </c:when> - <c:when test="${type == 'checkbox'}"> - <c:if test="${checked}"><![CDATA[ checked="checked" ]]></c:if> - </c:when> - </c:choose> - - <c:choose> - <c:when test="${type == 'textarea'}"><![CDATA[ >]]>${value}<![CDATA[</textarea>]]></c:when> - <c:otherwise><![CDATA[ />]]></c:otherwise> - </c:choose> - <c:if test="${type == checkbox}"> - <input type="hidden" name="_${name}" value="${value}"/> - </c:if> - - +<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"> + <jsp:directive.attribute name="name" required="true" /> + <jsp:directive.attribute name="value" required="true" /> + <jsp:directive.attribute name="type" required="false" /> + <jsp:directive.attribute name="cssclass" required="false" /> + <jsp:directive.attribute name="style" required="false" /> + <jsp:directive.attribute name="maxlength" required="false" /> + <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="checked" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="onkeypress" required="false" /> + <jsp:directive.attribute name="onkeydown" required="false" /> + <jsp:directive.attribute name="onkeyup" required="false" /> + <jsp:directive.attribute name="onchange" required="false" /> + <jsp:directive.attribute name="onblur" required="false" /> + <c:if test="${empty(type)}"> + <c:set var="type" value="text" /> + </c:if> + <c:choose> + <c:when test="${type == 'textarea'}"> + <![CDATA[<textarea name="${name}" id="${name}" ]]> + </c:when> + <c:otherwise> + <![CDATA[<input name="${name}" id="${name}" type="${type}"]]> + </c:otherwise> + </c:choose> + <c:choose> + <c:when test="${type == 'checkbox'}"> + <![CDATA[ value="true" ]]> + </c:when> + <c:when test="${type == 'textarea'}"></c:when> + <c:otherwise> + <![CDATA[ value="${value}" ]]> + </c:otherwise> + </c:choose> + <c:if test="${!empty(cssclass)}"> + <![CDATA[ class="${cssclass}" ]]> + </c:if> + <c:if test="${!empty(onkeypress)}"> + <![CDATA[ onkeypress="${onkeypress}" ]]> + </c:if> + <c:if test="${!empty(onkeydown)}"> + <![CDATA[ onkeydown="${onkeydown}" ]]> + </c:if> + <c:if test="${!empty(onkeyup)}"> + <![CDATA[ onkeydown="${onkeyup}" ]]> + </c:if> + <c:if test="${!empty(onchange)}"> + <![CDATA[ onchange="${onchange}" ]]> + </c:if> + <c:if test="${!empty(onblur)}"> + <![CDATA[ onblur="${onblur}" ]]> + </c:if> + <c:if test="${!empty(style)}"> + <![CDATA[ style="${style}" ]]> + </c:if> + <c:if test="${readonly}"> + <![CDATA[ readonly="readonly" ]]> + </c:if> + <c:if test="${disabled}"> + <![CDATA[ disabled="disabled" ]]> + </c:if> + <c:if test="${!empty(onkeypress) || !empty(onkeydown) || !empty(onkeyup) || !empty(onchange) || !empty(onblur)}"> + <![CDATA[ autocomplete="off" ]]> + </c:if> + <c:choose> + <c:when test="${type == 'text'}"> + <c:if test="${!empty(maxlength)}"> + <![CDATA[ maxlength="${maxlength}" ]]> + </c:if> + </c:when> + <c:when test="${type == 'checkbox'}"> + <c:if test="${checked}"> + <![CDATA[ checked="checked" ]]> + </c:if> + </c:when> + </c:choose> + <c:choose> + <c:when test="${type == 'textarea'}"> + <![CDATA[ >${value}</textarea>]]> + </c:when> + <c:otherwise> + <![CDATA[ />]]> + </c:otherwise> + </c:choose> + <c:if test="${type == checkbox}"> + <input type="hidden" name="_${name}" value="${value}" /> + </c:if> </jsp:root> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtoption.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtoption.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtoption.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,19 +1,16 @@ -<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"> - - - <jsp:directive.attribute name="value" required="true" /> - <jsp:directive.attribute name="selected" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="style" required="false" /> - <jsp:directive.attribute name="multiple" required="false" type="java.lang.Boolean" /> - - - <![CDATA[<option value="]]>${value}<![CDATA["]]> - <c:if test="${selected}"><![CDATA[ selected="selected" ]]></c:if> - <![CDATA[>]]> - <jsp:doBody /> - <![CDATA[</option>]]> - - +<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"> + <jsp:directive.attribute name="value" required="true" /> + <jsp:directive.attribute name="selected" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="style" required="false" /> + <jsp:directive.attribute name="multiple" required="false" type="java.lang.Boolean" /> + <![CDATA[<option value="${value}"]]> + <c:if test="${selected}"> + <![CDATA[ selected="selected" ]]> + </c:if> + <![CDATA[>]]> + <jsp:doBody /> + <![CDATA[</option>]]> </jsp:root> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtselect.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtselect.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txtselect.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,36 +1,43 @@ -<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"> - - - <jsp:directive.attribute name="name" required="true" /> - <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="cssclass" required="false" /> - <jsp:directive.attribute name="multiple" required="false" type="java.lang.Boolean" /> - <jsp:directive.attribute name="value" required="false" /> - <jsp:directive.attribute name="onchange" required="false" /> - - <c:if test="${multiple}"> - <c:set var="cssclass">multiple ${cssclass}</c:set> - </c:if> - - - <!-- readonly selects are emulated using a disabled select + hidden field --> - <c:if test="${readonly}"><input type="hidden" name="${name}" value="${value}"/></c:if> - - <![CDATA[<select name="]]>${name}<![CDATA["]]> - <![CDATA[ id="]]>${name}<![CDATA["]]> - <c:if test="${readonly}"><![CDATA[ disabled="disabled" ]]></c:if> - <c:if test="${disabled}"><![CDATA[ disabled="disabled" ]]></c:if> - <c:if test="${multiple}"><![CDATA[ multiple="multiple" ]]></c:if> - <c:if test="${!empty(cssclass)}"><![CDATA[ class="]]>${cssclass}<![CDATA[" ]]></c:if> - <c:if test="${!empty(style)}"><![CDATA[ style="]]>${style}<![CDATA[" ]]></c:if> - <c:if test="${!empty(onchange)}"><![CDATA[ onChange="]]>${onchange}<![CDATA[" ]]></c:if> - <![CDATA[>]]> - <jsp:doBody /> - <![CDATA[</select>]]> - - +<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"> + <jsp:directive.attribute name="name" required="true" /> + <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="cssclass" required="false" /> + <jsp:directive.attribute name="multiple" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="value" required="false" /> + <jsp:directive.attribute name="onchange" required="false" /> + <c:if test="${multiple}"> + <c:set var="cssclass">multiple ${cssclass}</c:set> + </c:if> + <!-- readonly selects are emulated using a disabled select + hidden field --> + <c:if test="${readonly}"> + <input type="hidden" name="${name}" value="${value}" /> + </c:if> + <![CDATA[<select name="${name}"]]> + <![CDATA[ id="${name}"]]> + <c:if test="${readonly}"> + <![CDATA[ disabled="disabled" ]]> + </c:if> + <c:if test="${disabled}"> + <![CDATA[ disabled="disabled" ]]> + </c:if> + <c:if test="${multiple}"> + <![CDATA[ multiple="multiple" ]]> + </c:if> + <c:if test="${!empty(cssclass)}"> + <![CDATA[ class="${cssclass}" ]]> + </c:if> + <c:if test="${!empty(style)}"> + <![CDATA[ style="${style}" ]]> + </c:if> + <c:if test="${!empty(onchange)}"> + <![CDATA[ onChange="${onchange}" ]]> + </c:if> + <![CDATA[>]]> + <jsp:doBody /> + <![CDATA[</select>]]> </jsp:root> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txttextarea.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txttextarea.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/txttextarea.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -1,23 +1,27 @@ -<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"> - - - <jsp:directive.attribute name="name" required="true" /> - <jsp:directive.attribute name="value" required="true" /> - <jsp:directive.attribute name="type" required="false" /> - <jsp:directive.attribute name="cssclass" required="false" /> - <jsp:directive.attribute name="style" required="false" /> - <jsp:directive.attribute name="maxlength" required="false" /> - <jsp:directive.attribute name="readonly" required="false" type="java.lang.Boolean"/> - <jsp:directive.attribute name="disabled" required="false" type="java.lang.Boolean"/> - - <![CDATA[<textarea name="]]>${name}<![CDATA[" id="]]>${name}<![CDATA["]]> - <c:if test="${!empty(cssclass)}"><![CDATA[ class="]]>${cssclass}<![CDATA[" ]]></c:if> - <c:if test="${!empty(styled)}"><![CDATA[ style="]]>${style}<![CDATA[" ]]></c:if> - <c:if test="${readonly}"><![CDATA[ readonly="readonly" ]]></c:if> - <c:if test="${disabled}"><![CDATA[ disabled="disabled" ]]></c:if> - <![CDATA[>]]>${value}<![CDATA[</textarea>]]> - - +<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"> + <jsp:directive.attribute name="name" required="true" /> + <jsp:directive.attribute name="value" required="true" /> + <jsp:directive.attribute name="type" required="false" /> + <jsp:directive.attribute name="cssclass" required="false" /> + <jsp:directive.attribute name="style" required="false" /> + <jsp:directive.attribute name="maxlength" required="false" /> + <jsp:directive.attribute name="readonly" required="false" type="java.lang.Boolean" /> + <jsp:directive.attribute name="disabled" required="false" type="java.lang.Boolean" /> + <![CDATA[<textarea name="${name}" id="${name}"]]> + <c:if test="${!empty(cssclass)}"> + <![CDATA[ class="${cssclass}" ]]> + </c:if> + <c:if test="${!empty(styled)}"> + <![CDATA[ style="${style}" ]]> + </c:if> + <c:if test="${readonly}"> + <![CDATA[ readonly="readonly" ]]> + </c:if> + <c:if test="${disabled}"> + <![CDATA[ disabled="disabled" ]]> + </c:if> + <![CDATA[>${value}</textarea>]]> </jsp:root> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/url.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/url.tag 2007-02-13 17:31:26 UTC (rev 250) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/url.tag 2007-02-13 21:12:44 UTC (rev 251) @@ -11,9 +11,11 @@ <c:choose> <c:when test="${!empty(var)}"> <jsp:scriptlet> + <![CDATA[ String varName = (String)jspContext.getAttribute("var"); String varContent = (String)jspContext.getAttribute("tmpVar"); jspContext.setAttribute(varName, varContent); + ]]> </jsp:scriptlet> </c:when> <c:otherwise>${tmpVar}</c:otherwise> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 17:33:10
|
Revision: 250 http://svn.sourceforge.net/openutils/?rev=250&view=rev Author: fgiust Date: 2007-02-13 09:31:26 -0800 (Tue, 13 Feb 2007) Log Message: ----------- new SecurityUtils class Added Paths: ----------- trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/utils/ trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/utils/SecurityUtils.java Added: trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/utils/SecurityUtils.java =================================================================== --- trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/utils/SecurityUtils.java (rev 0) +++ trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/utils/SecurityUtils.java 2007-02-13 17:31:26 UTC (rev 250) @@ -0,0 +1,59 @@ +package it.openutils.usermanagement.utils; + +import it.openutils.usermanagement.dataobjects.User; + +import org.acegisecurity.Authentication; +import org.acegisecurity.GrantedAuthority; +import org.acegisecurity.context.SecurityContextHolder; + + +/** + * @author fgiust + * @version $Id$ + */ +public class SecurityUtils +{ + + /** + * Return current user logged. + * @return Utente + */ + public static User getCurrentUser() + { + User currentUser = null; + if (SecurityContextHolder.getContext().getAuthentication() != null) + { + Authentication auth = SecurityContextHolder.getContext().getAuthentication(); + if (auth != null && auth.getPrincipal() instanceof User) + { + currentUser = (User) auth.getPrincipal(); + } + } + + return currentUser; + } + + /** + * Check if the current user is in the given role. + * @param role role to check + * @return <code>true</code> if current user is assigned to the given role + */ + public static Boolean isUserInRole(String role) + { + if (role == null || SecurityContextHolder.getContext().getAuthentication() == null) + { + return false; + } + GrantedAuthority[] roles = SecurityContextHolder.getContext().getAuthentication().getAuthorities(); + + for (GrantedAuthority grantedAuthority : roles) + { + if (role.equals(grantedAuthority.getAuthority())) + { + return true; + } + } + + return false; + } +} Property changes on: trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/utils/SecurityUtils.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 10:44:08
|
Revision: 249 http://svn.sourceforge.net/openutils/?rev=249&view=rev Author: fgiust Date: 2007-02-13 02:44:09 -0800 (Tue, 13 Feb 2007) Log Message: ----------- cleanup spaces in 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-13 10:23:46 UTC (rev 248) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-13 10:44:09 UTC (rev 249) @@ -49,7 +49,7 @@ <c:when test="${!nobind}"> <spring:bind path="${path}"> <c:set var="divclass"> - formelement + <jsp:text>formelement</jsp:text> <c:if test="${!empty(status.errorMessage)}">${elx:space()}formelementerror</c:if> </c:set> <c:if test="${!bare}"> @@ -79,10 +79,6 @@ <input type="hidden" name="_${name}" value="" /> </c:when> <c:otherwise> - <c:set var="divclass"> - formelement - <c:if test="${!empty(status.errorMessage)}">${elx:space()}formelementerror</c:if> - </c:set> <c:if test="${empty(name)}"> <c:set var="name">${su:substringAfter(path, ".")}</c:set> </c:if> @@ -115,9 +111,7 @@ <!-- nobind --> <c:otherwise> <c:if test="${!bare}"> - <![CDATA[<div class="]]> - ${divclass} - <![CDATA[">]]> + <![CDATA[<div class="${divclass}">]]> <label for="${name}">${labelmsg}</label> </c:if> <c:choose> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 10:23:48
|
Revision: 248 http://svn.sourceforge.net/openutils/?rev=248&view=rev Author: fgiust Date: 2007-02-13 02:23:46 -0800 (Tue, 13 Feb 2007) Log Message: ----------- minor fix in debug log Modified Paths: -------------- trunk/openutils-spring/src/main/java/it/openutils/spring/editors/GenericSinglePropertyEditor.java Modified: trunk/openutils-spring/src/main/java/it/openutils/spring/editors/GenericSinglePropertyEditor.java =================================================================== --- trunk/openutils-spring/src/main/java/it/openutils/spring/editors/GenericSinglePropertyEditor.java 2007-02-13 10:00:30 UTC (rev 247) +++ trunk/openutils-spring/src/main/java/it/openutils/spring/editors/GenericSinglePropertyEditor.java 2007-02-13 10:23:46 UTC (rev 248) @@ -57,7 +57,7 @@ { Object value = getValue(); - log.debug("getAsText({}", value); + log.debug("getAsText({})", value); String returnString = null; @@ -104,7 +104,7 @@ parameters[0] = new Long(text); } - Object value = MethodUtils.invokeMethod(dao, "load", parameters, new Class[]{this.propertyType}); + Object value = MethodUtils.invokeMethod(dao, "load", parameters, new Class[]{this.propertyType }); setValue(value); } catch (Exception e) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 10:00:32
|
Revision: 247 http://svn.sourceforge.net/openutils/?rev=247&view=rev Author: fgiust Date: 2007-02-13 02:00:30 -0800 (Tue, 13 Feb 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-tags-spring/pom.xml Modified: trunk/openutils-tags-spring/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-02-13 10:00:24 UTC (rev 246) +++ trunk/openutils-tags-spring/pom.xml 2007-02-13 10:00:30 UTC (rev 247) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-tags-spring</artifactId> <name>openutils tags for spring MVC</name> - <version>0.3</version> + <version>1.0-SNAPSHOT</version> <description /> <dependencies> <dependency> @@ -76,10 +76,4 @@ <scope>test</scope> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-tags-spring-0.3</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 10:00:23
|
Revision: 246 http://svn.sourceforge.net/openutils/?rev=246&view=rev Author: fgiust Date: 2007-02-13 02:00:24 -0800 (Tue, 13 Feb 2007) Log Message: ----------- [maven-scm] copy for tag openutils-tags-spring-0.3 Added Paths: ----------- tags/openutils-tags-spring-0.3/ tags/openutils-tags-spring-0.3/pom.xml Removed Paths: ------------- tags/openutils-tags-spring-0.3/pom.xml Copied: tags/openutils-tags-spring-0.3 (from rev 244, trunk/openutils-tags-spring) Deleted: tags/openutils-tags-spring-0.3/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-02-12 16:15:02 UTC (rev 244) +++ tags/openutils-tags-spring-0.3/pom.xml 2007-02-13 10:00:24 UTC (rev 246) @@ -1,79 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-tags-spring</artifactId> - <name>openutils tags for spring MVC</name> - <version>1.0-SNAPSHOT</version> - <description /> - <dependencies> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>jstl</groupId> - <artifactId>jstl</artifactId> - <version>1.1.2</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <version>2.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.2</version> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.7.0</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>2.0.1</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>taglibs</groupId> - <artifactId>standard</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.13</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.0</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-tags-spring-0.3/pom.xml (from rev 245, trunk/openutils-tags-spring/pom.xml) =================================================================== --- tags/openutils-tags-spring-0.3/pom.xml (rev 0) +++ tags/openutils-tags-spring-0.3/pom.xml 2007-02-13 10:00:24 UTC (rev 246) @@ -0,0 +1,85 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-tags-spring</artifactId> + <name>openutils tags for spring MVC</name> + <version>0.3</version> + <description /> + <dependencies> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>jstl</groupId> + <artifactId>jstl</artifactId> + <version>1.1.2</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.7.0</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>2.0.1</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.0</version> + <scope>test</scope> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-tags-spring-0.3</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-13 10:00:15
|
Revision: 245 http://svn.sourceforge.net/openutils/?rev=245&view=rev Author: fgiust Date: 2007-02-13 02:00:15 -0800 (Tue, 13 Feb 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-tags-spring-0.3 Modified Paths: -------------- trunk/openutils-tags-spring/pom.xml Modified: trunk/openutils-tags-spring/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-02-12 16:15:02 UTC (rev 244) +++ trunk/openutils-tags-spring/pom.xml 2007-02-13 10:00:15 UTC (rev 245) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-tags-spring</artifactId> <name>openutils tags for spring MVC</name> - <version>1.0-SNAPSHOT</version> + <version>0.3</version> <description /> <dependencies> <dependency> @@ -76,4 +76,10 @@ <scope>test</scope> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-tags-spring-0.3</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-tags-spring-0.3</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-12 16:15:07
|
Revision: 244 http://svn.sourceforge.net/openutils/?rev=244&view=rev Author: fgiust Date: 2007-02-12 08:15:02 -0800 (Mon, 12 Feb 2007) Log Message: ----------- fix missing close div and class (+ reformatting) 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-12 14:58:04 UTC (rev 243) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-12 16:15:02 UTC (rev 244) @@ -1,10 +1,9 @@ -<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" +<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" /> @@ -21,12 +20,9 @@ <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]}" /> @@ -35,8 +31,6 @@ <c:set var="backingList" value="${dao:findAll(pageContext, findall)}" /> </c:when> </c:choose> - - <c:choose> <c:when test="${empty(label)}"> <c:set var="labelmsg"> @@ -46,30 +40,28 @@ <c:otherwise> <c:set var="labelmsg">${label}</c:set> </c:otherwise> - </c:choose> - + </c:choose> + <c:set var="divclass">formelement</c:set> + <c:if test="${empty(name)}"> + <c:set var="name">${su:substringAfter(path, ".")}</c:set> + </c:if> <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 var="divclass"> + formelement + <c:if test="${!empty(status.errorMessage)}">${elx:space()}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> + <![CDATA[<div class="${divclass}">]]> + <label for="${name}">${labelmsg}</label> </c:if> - <c:choose> <c:when test="${multiple}"> - <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" + <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}" /> @@ -78,11 +70,8 @@ <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> @@ -90,19 +79,19 @@ <input type="hidden" name="_${name}" value="" /> </c:when> <c:otherwise> - <c:set var="divclass">formelement <c:if test="${!empty(status.errorMessage)}"> formelementerror</c:if> + <c:set var="divclass"> + formelement + <c:if test="${!empty(status.errorMessage)}">${elx:space()}formelementerror</c:if> </c:set> <c:if test="${empty(name)}"> <c:set var="name">${su:substringAfter(path, ".")}</c:set> </c:if> - - <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" + <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}" /> @@ -111,36 +100,32 @@ <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:when> + <!-- nobind --> <c:otherwise> <c:if test="${!bare}"> - <![CDATA[<div class="]]>${divclass}<![CDATA[">]]> - <label for="${name}">${labelmsg} </label> + <![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}" + <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}" /> @@ -149,11 +134,8 @@ <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> @@ -161,13 +143,12 @@ <input type="hidden" name="_${name}" value="" /> </c:when> <c:otherwise> - <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" + <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}" /> @@ -176,14 +157,14 @@ <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> + </ou:txtselect> + <c:if test="${!bare}"> + <![CDATA[<div class="clear"><!-- --></div> </div>]]> + </c:if> </c:otherwise> </c:choose> </c:otherwise> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-12 14:58:06
|
Revision: 243 http://svn.sourceforge.net/openutils/?rev=243&view=rev Author: fcarone Date: 2007-02-12 06:58:04 -0800 (Mon, 12 Feb 2007) Log Message: ----------- handle name property of 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-12 11:26:24 UTC (rev 242) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-12 14:58:04 UTC (rev 243) @@ -90,6 +90,12 @@ <input type="hidden" name="_${name}" value="" /> </c:when> <c:otherwise> + <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> + <ou:txtselect name="${name}" multiple="${multiple}" style="${style}" readonly="${readonly}" disabled="${disabled}" onchange="${onchange}"> <c:if test="${addempty}"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <fg...@us...> - 2007-02-11 21:49:48
|
Revision: 241 http://svn.sourceforge.net/openutils/?rev=241&view=rev Author: fgiust Date: 2007-02-11 13:49:49 -0800 (Sun, 11 Feb 2007) Log Message: ----------- work in progress: don't let hibernate validator resolve messages, pass them back to spring for resolution Modified Paths: -------------- trunk/openutils-spring/src/main/java/it/openutils/spring/validation/hibernate/AnnotationValidator.java Modified: trunk/openutils-spring/src/main/java/it/openutils/spring/validation/hibernate/AnnotationValidator.java =================================================================== --- trunk/openutils-spring/src/main/java/it/openutils/spring/validation/hibernate/AnnotationValidator.java 2007-02-11 17:22:27 UTC (rev 240) +++ trunk/openutils-spring/src/main/java/it/openutils/spring/validation/hibernate/AnnotationValidator.java 2007-02-11 21:49:49 UTC (rev 241) @@ -1,7 +1,13 @@ package it.openutils.spring.validation.hibernate; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.ResourceBundle; + import org.hibernate.validator.ClassValidator; import org.hibernate.validator.InvalidValue; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; import org.springframework.validation.Errors; import org.springframework.validation.Validator; @@ -10,12 +16,26 @@ * @author fgiust * @version $Id$ */ -public class AnnotationValidator implements Validator +public class AnnotationValidator implements Validator, ApplicationContextAware { /** - * @see org.springframework.validation.Validator#supports(java.lang.Class) + * ApplicationContext needed for message resolution. */ + private ApplicationContext applicationContext; + + /** + * Sets the applicationContext. + * @param applicationContext the applicationContext to set + */ + public void setApplicationContext(ApplicationContext applicationContext) + { + this.applicationContext = applicationContext; + } + + /** + * {@inheritDoc} + */ @SuppressWarnings("unchecked") public boolean supports(Class clazz) { @@ -28,15 +48,47 @@ @SuppressWarnings("unchecked") public void validate(Object obj, Errors errors) { - ClassValidator classValidator = new ClassValidator(obj.getClass()); + ClassValidator classValidator = new ClassValidator(obj.getClass(), new KeybackResourceBundle()); + InvalidValue[] validationMessages = classValidator.getInvalidValues(obj); for (InvalidValue value : validationMessages) { - String propertyName = value.getPropertyName(); - + String propertyName = value.getPropertyPath(); + String fqPropertyName = errors.getObjectName() + "." + propertyName; String message = value.getMessage(); - errors.rejectValue(propertyName, null, message); + errors.rejectValue(propertyName, message, new Object[]{fqPropertyName }, null); + } } + + /** + * ResourceBundle implementation that always returns the same String used as a key. Needed to avoid making + * ClassValidator resolve message keys, so that they will still be available to Spring. + * @author fgiust + * @version $Id$ + */ + protected static class KeybackResourceBundle extends ResourceBundle + { + + /** + * {@inheritDoc} + */ + @Override + public Enumeration<String> getKeys() + { + return new Hashtable<String, String>().keys(); + } + + /** + * {@inheritDoc} + */ + @Override + protected Object handleGetObject(String key) + { + return key; + } + + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-11 17:22:28
|
Revision: 240 http://svn.sourceforge.net/openutils/?rev=240&view=rev Author: fgiust Date: 2007-02-11 09:22:27 -0800 (Sun, 11 Feb 2007) Log Message: ----------- add specific class to formelement div Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.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-11 09:39:48 UTC (rev 239) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-11 17:22:27 UTC (rev 240) @@ -50,7 +50,9 @@ <c:if test="${maxlength ge 256}"> <c:set var="type" value="textarea" /> </c:if> - <c:set var="divclass">formelement</c:set> + <c:set var="divclass"> + <jsp:text>formelement formelement${type}</jsp:text> + </c:set> <c:set var="cssclass"> <jsp:text>${type} ${cssclass}</jsp:text> <c:if test="${readonly}">${elx:space()}readonly</c:if> @@ -70,7 +72,7 @@ <c:when test="${!nobind}"> <spring:bind path="${path}"> <c:set var="divclass"> - <jsp:text>formelement</jsp:text> + <jsp:text>${divclass}</jsp:text> <c:if test="${!empty(status.errorMessage)}">${elx:space()}formelementerror</c:if> </c:set> <c:choose> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |