You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by al...@apache.org on 2007/06/04 14:06:00 UTC
svn commit: r544135 -
/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
Author: almaw
Date: Mon Jun 4 05:05:59 2007
New Revision: 544135
URL: http://svn.apache.org/viewvc?view=rev&rev=544135
Log:
WICKET-606 - Don't set type if it's a String, so we can make convertEmptyInputStringToNull work again.
Modified:
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java?view=diff&rev=544135&r1=544134&r2=544135
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java Mon Jun 4 05:05:59 2007
@@ -102,7 +102,13 @@
super.onBeforeRender();
if (getType() == null)
{
- setType(getModelType(getModel()));
+ // Set the type, but only if it's not a String (see WICKET-606).
+ // Otherwise, getConvertEmptyInputStringToNull() won't work.
+ Class type = getModelType(getModel());
+ if (String.class.equals(type))
+ {
+ setType(type);
+ }
}
}