Fix critical issue with multiAutoComplete on autocomplete field types
This commit is contained in:
parent
19aa2bd411
commit
6ce7fec059
|
@ -95,14 +95,14 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
|
||||||
this.autoCompleteSingleDataList.add(new AutoCompleteSingleData());
|
this.autoCompleteSingleDataList.add(new AutoCompleteSingleData());
|
||||||
this.mapFromXml(item, this.autoCompleteSingleDataList.get(0));
|
this.mapFromXml(item, this.autoCompleteSingleDataList.get(0));
|
||||||
}
|
}
|
||||||
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutocomplete"));
|
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutoComplete"));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void mapFromXml(Element item, AutoCompleteSingleData singleData) {
|
private void mapFromXml(Element item, AutoCompleteSingleData singleData) {
|
||||||
singleData.url = item.getAttribute("url");
|
singleData.url = item.getAttribute("url");
|
||||||
singleData.optionsRoot = item.getAttribute("optionsRoot");
|
singleData.optionsRoot = item.getAttribute("optionsRoot");
|
||||||
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutocomplete"));
|
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutoComplete"));
|
||||||
if (item.getAttribute("autoCompleteType") == null || item.getAttribute("autoCompleteType").equals("") ) {
|
if (item.getAttribute("autoCompleteType") == null || item.getAttribute("autoCompleteType").equals("") ) {
|
||||||
singleData.autocompleteType = AutocompleteType.UNCACHED.getValue();
|
singleData.autocompleteType = AutocompleteType.UNCACHED.getValue();
|
||||||
} else {
|
} else {
|
||||||
|
@ -173,7 +173,7 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
|
||||||
dataMap.put("label", item != null ? item.getAttribute("label") : "");
|
dataMap.put("label", item != null ? item.getAttribute("label") : "");
|
||||||
//dataMap.put("url", item != null ? item.getAttribute("url") : "");
|
//dataMap.put("url", item != null ? item.getAttribute("url") : "");
|
||||||
dataMap.put("type", item != null ? item.getAttribute("type") : "autocomplete");
|
dataMap.put("type", item != null ? item.getAttribute("type") : "autocomplete");
|
||||||
dataMap.put("multiAutoComplete", item != null ? Boolean.valueOf(item.getAttribute("multiAutocomplete")) : false);
|
dataMap.put("multiAutoComplete", item != null ? Boolean.valueOf(item.getAttribute("multiAutoComplete")) : false);
|
||||||
List<Map<String, Object>> autoCompletes = new ArrayList<>();
|
List<Map<String, Object>> autoCompletes = new ArrayList<>();
|
||||||
NodeList autoCompleteSingles = item.getChildNodes();
|
NodeList autoCompleteSingles = item.getChildNodes();
|
||||||
for (int i = 0; i < autoCompleteSingles.getLength(); i++) {
|
for (int i = 0; i < autoCompleteSingles.getLength(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue