Author: jcompagner
Date: Sat Nov  3 06:01:34 2007
New Revision: 591612

URL: http://svn.apache.org/viewvc?rev=591612&view=rev
Log:
WICKET-1117

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java?rev=591612&r1=591611&r2=591612&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
 Sat Nov  3 06:01:34 2007
@@ -18,6 +18,7 @@
 
 import java.text.SimpleDateFormat;
 
+import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.IObjectClassAwareModel;
 import org.apache.wicket.util.convert.ConversionException;
@@ -31,6 +32,9 @@
  */
 public abstract class AbstractTextComponent extends FormComponent
 {
+       // Flag for the type resolving. FLAG_RESERVED1-3 is taken by form 
component
+       private static final int TYPE_RESOLVED = Component.FLAG_RESERVED4;
+
        /**
         * 
         */
@@ -103,7 +107,7 @@
        protected void onBeforeRender()
        {
                super.onBeforeRender();
-               if (getType() == null)
+               if (!getFlag(TYPE_RESOLVED))
                {
                        // Set the type, but only if it's not a String (see 
WICKET-606).
                        // Otherwise, getConvertEmptyInputStringToNull() won't 
work.
@@ -112,6 +116,7 @@
                        {
                                setType(type);
                        }
+                       setFlag(TYPE_RESOLVED, true);
                }
        }
 


Reply via email to