Skip to content

Commit

Permalink
Added another ModelFormField.TextField constructor to allow subclass …
Browse files Browse the repository at this point in the history
…RangeFindField constructor to override the TextField default fieldType of FieldInfo.TEXT with FieldInfo.RANGEQBE

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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683832 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ccarlow committed Jun 5, 2015
1 parent 4d18478 commit a01846a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,7 @@ public RangeFindField(Element element, ModelFormField 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";
}
Expand Down Expand Up @@ -3727,6 +3727,19 @@ public TextField(Element element, ModelFormField 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;
Expand Down

0 comments on commit a01846a

Please sign in to comment.