aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2011-09-14 10:33:38 +0000
committerManolo Carrasco <manolo@apache.org>2011-09-14 10:33:38 +0000
commitc5f692eb8fe1fa2a785468bc7fd999d70ecb716d (patch)
tree7c6d7652a40e358cc0ed39a5cc517dcf24aed153 /gwtquery-core
parent823278409dda928d9f338d8eca64859472eca801 (diff)
downloadgwtquery-c5f692eb8fe1fa2a785468bc7fd999d70ecb716d.tar.gz
gwtquery-c5f692eb8fe1fa2a785468bc7fd999d70ecb716d.zip
Fix default negative maxlengh in textbox
Diffstat (limited to 'gwtquery-core')
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java
index 50ffb209..af82d241 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java
@@ -17,8 +17,7 @@ package com.google.gwt.query.client.plugins.widgets;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.InputElement;
-import com.google.gwt.query.client.plugins.widgets.WidgetFactory;
-import com.google.gwt.query.client.plugins.widgets.WidgetsUtils;
+import com.google.gwt.query.client.GQuery;
import com.google.gwt.user.client.ui.TextBoxBase;
/**
@@ -49,16 +48,15 @@ public abstract class TextBoxBaseWidgetFactory<T extends TextBoxBase>
protected void copyAttributes(Element src, Element dest) {
InputElement source = src.cast();
InputElement destination = dest.cast();
-
+
destination.setAccessKey(source.getAccessKey());
destination.setDefaultValue(source.getDefaultValue());
destination.setDisabled(source.isDisabled());
- destination.setMaxLength(source.getMaxLength());
+ if (source.getMaxLength() > 0) destination.setMaxLength(source.getMaxLength());
destination.setReadOnly(source.isReadOnly());
destination.setSize(source.getSize());
destination.setName(source.getName());
destination.setValue(source.getValue());
-
}
protected abstract T createWidget();