svn commit: r1805011 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1805011 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java

nmalin
Author: nmalin
Date: Mon Aug 14 15:47:36 2017
New Revision: 1805011

URL: http://svn.apache.org/viewvc?rev=1805011&view=rev
Log:
Fixed: Missing fieldInfo when call constructor for ModelFormField Password, File and Lookup
When you create a form with an entity or service auto fields, the three previous form field call only "super(fieldSource, modelFormField);" in their constructor or this initialise a TextField with the fieldInfo FieldInfo.TEXT.
I force the field info when the super constructor is called


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

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java?rev=1805011&r1=1805010&r2=1805011&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java Mon Aug 14 15:47:36 2017
@@ -2096,7 +2096,7 @@ public class ModelFormField {
         }
 
         public FileField(int fieldSource, ModelFormField modelFormField) {
-            super(fieldSource, modelFormField);
+            super(fieldSource, FieldInfo.FILE, modelFormField);
         }
 
         @Override
@@ -3028,7 +3028,7 @@ public class ModelFormField {
         }
 
         public LookupField(int fieldSource, ModelFormField modelFormField) {
-            super(fieldSource, modelFormField);
+            super(fieldSource, FieldInfo.LOOKUP, modelFormField);
             this.descriptionFieldName = "";
             this.fadeBackground = "";
             this.formName = FlexibleStringExpander.getInstance("");
@@ -3250,7 +3250,7 @@ public class ModelFormField {
         }
 
         public PasswordField(int fieldSource, ModelFormField modelFormField) {
-            super(fieldSource, modelFormField);
+            super(fieldSource, FieldInfo.PASSWORD, modelFormField);
         }
 
         private PasswordField(PasswordField original, ModelFormField modelFormField) {


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1805011 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbi z/widget/model/ModelFormField.java

Jacques Le Roux
Administrator
Good catch Nicolas,

Should there not be a related Jira?

Thanks

Jacques


Le 14/08/2017 à 17:47, [hidden email] a écrit :

> Author: nmalin
> Date: Mon Aug 14 15:47:36 2017
> New Revision: 1805011
>
> URL: http://svn.apache.org/viewvc?rev=1805011&view=rev
> Log:
> Fixed: Missing fieldInfo when call constructor for ModelFormField Password, File and Lookup
> When you create a form with an entity or service auto fields, the three previous form field call only "super(fieldSource, modelFormField);" in their constructor or this initialise a TextField with the fieldInfo FieldInfo.TEXT.
> I force the field info when the super constructor is called
>
>
> Modified:
>      ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
>
> Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java?rev=1805011&r1=1805010&r2=1805011&view=diff
> ==============================================================================
> --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java (original)
> +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java Mon Aug 14 15:47:36 2017
> @@ -2096,7 +2096,7 @@ public class ModelFormField {
>           }
>  
>           public FileField(int fieldSource, ModelFormField modelFormField) {
> -            super(fieldSource, modelFormField);
> +            super(fieldSource, FieldInfo.FILE, modelFormField);
>           }
>  
>           @Override
> @@ -3028,7 +3028,7 @@ public class ModelFormField {
>           }
>  
>           public LookupField(int fieldSource, ModelFormField modelFormField) {
> -            super(fieldSource, modelFormField);
> +            super(fieldSource, FieldInfo.LOOKUP, modelFormField);
>               this.descriptionFieldName = "";
>               this.fadeBackground = "";
>               this.formName = FlexibleStringExpander.getInstance("");
> @@ -3250,7 +3250,7 @@ public class ModelFormField {
>           }
>  
>           public PasswordField(int fieldSource, ModelFormField modelFormField) {
> -            super(fieldSource, modelFormField);
> +            super(fieldSource, FieldInfo.PASSWORD, modelFormField);
>           }
>  
>           private PasswordField(PasswordField original, ModelFormField modelFormField) {
>
>
>