You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by cc...@apache.org on 2015/06/05 20:35:13 UTC

svn commit: r1683832 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java

Author: ccarlow
Date: Fri Jun  5 18:35:13 2015
New Revision: 1683832

URL: http://svn.apache.org/r1683832
Log:
Added another ModelFormField.TextField constructor to allow subclass RangeFindField constructor to override the TextField default fieldType of FieldInfo.TEXT with FieldInfo.RANGEQBE

https://issues.apache.org/jira/browse/OFBIZ-6459

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java?rev=1683832&r1=1683831&r2=1683832&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java Fri Jun  5 18:35:13 2015
@@ -3084,7 +3084,7 @@ public class ModelFormField {
         }
 
         public RangeFindField(int fieldSource, int size, ModelFormField modelFormField) {
-            super(fieldSource, size, null, modelFormField);
+            super(fieldSource, size, null, modelFormField, FieldInfo.RANGEQBE);
             this.defaultOptionFrom = "greaterThanEqualTo";
             this.defaultOptionThru = "lessThanEqualTo";
         }
@@ -3727,6 +3727,19 @@ public class ModelFormField {
             }
         }
 
+        protected TextField(int fieldSource, int size, Integer maxlength, ModelFormField modelFormField, int fieldType) {
+            super(fieldSource, fieldType == -1 ? FieldInfo.TEXT : fieldType, modelFormField);
+            this.clientAutocompleteField = true;
+            this.defaultValue = FlexibleStringExpander.getInstance("");
+            this.disabled = false;
+            this.mask = "";
+            this.maxlength = maxlength;
+            this.placeholder = FlexibleStringExpander.getInstance("");
+            this.readonly = false;
+            this.size = size;   
+            this.subHyperlink = null;
+        }
+        
         protected TextField(int fieldSource, int size, Integer maxlength, ModelFormField modelFormField) {
             super(fieldSource, FieldInfo.TEXT, modelFormField);
             this.clientAutocompleteField = true;