WICKET-5313 Wrong HTML attribute used in SizeTagModifier 
(wicket-bean-validation)


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ff619871
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ff619871
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ff619871

Branch: refs/heads/5299-ajax-strategy
Commit: ff619871686bbb171099d6e9ee9572b071de517f
Parents: e6c24a1
Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
Authored: Mon Aug 12 12:12:19 2013 +0300
Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
Committed: Mon Aug 12 12:12:19 2013 +0300

----------------------------------------------------------------------
 .../java/org/apache/wicket/bean/validation/SizeTagModifier.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ff619871/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/SizeTagModifier.java
----------------------------------------------------------------------
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/SizeTagModifier.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/SizeTagModifier.java
index 7d453af..4124974 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/SizeTagModifier.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/SizeTagModifier.java
@@ -6,7 +6,7 @@ import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.html.form.FormComponent;
 
 /**
- * A tag modifier that adds the {@code maxlen} attribute to the {@code input} 
tag with the max value
+ * A tag modifier that adds the {@code maxlength} attribute to the {@code 
input} tag with the max value
  * from the {@link Size} constraint annotation.
  * 
  * @author igor
@@ -19,8 +19,7 @@ public class SizeTagModifier implements ITagModifier<Size>
        {
                if ("input".equalsIgnoreCase(tag.getName()))
                {
-                       Size size = (Size)annotation;
-                       tag.put("maxlen", size.max());
+                       tag.put("maxlength", annotation.max());
                }
        }
 }

Reply via email to