Commit 071a7423 authored by Nicolas Malin's avatar Nicolas Malin

Fixed: Fix missing else during previous refactoring

(OFBIZ-11253)
When you rendering for with auto-field-entity on edit mode, indicator field has been override by text field.
Fix also two error on source field type set to FieldInfo.SOURCE_AUTO_SERVICE instead of FieldInfo.SOURCE_AUTO_ENTITY

Thanks to Olivier Heintz to inform on the regression.
parent 87d74653
......@@ -586,10 +586,10 @@ public class ModelFormFieldBuilder {
this.setFieldInfo(textField);
}
} else if ("display".equals(defaultFieldType)) {
ModelFormField.DisplayField displayField = new ModelFormField.DisplayField(FieldInfo.SOURCE_AUTO_SERVICE, null);
ModelFormField.DisplayField displayField = new ModelFormField.DisplayField(FieldInfo.SOURCE_AUTO_ENTITY, null);
this.setFieldInfo(displayField);
} else if ("hidden".equals(defaultFieldType)) {
ModelFormField.HiddenField hiddenField = new ModelFormField.HiddenField(FieldInfo.SOURCE_AUTO_SERVICE, null);
ModelFormField.HiddenField hiddenField = new ModelFormField.HiddenField(FieldInfo.SOURCE_AUTO_ENTITY, null);
this.setFieldInfo(hiddenField);
} else {
if ("indicator".equals(fieldType)) {
......@@ -602,7 +602,7 @@ public class ModelFormFieldBuilder {
} else if ("very-long".equals(fieldType)) {
ModelFormField.TextareaField textareaField = new ModelFormField.TextareaField(FieldInfo.SOURCE_AUTO_ENTITY, null);
this.setFieldInfo(textareaField);
} if (textFieldTypes.contains(fieldType)) {
} else if (textFieldTypes.contains(fieldType)) {
ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY,
textSizeByFieldTypes.get(fieldType), textMaxSizeByFieldTypes.get(fieldType), null);
this.setFieldInfo(textField);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment