Fix critical issue with multiAutoComplete on autocomplete field types

This commit is contained in:
George Kalampokis 2021-11-29 11:27:59 +02:00
parent 19aa2bd411
commit 6ce7fec059
1 changed files with 3 additions and 3 deletions

View File

@ -95,14 +95,14 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
this.autoCompleteSingleDataList.add(new AutoCompleteSingleData());
this.mapFromXml(item, this.autoCompleteSingleDataList.get(0));
}
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutocomplete"));
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutoComplete"));
return this;
}
private void mapFromXml(Element item, AutoCompleteSingleData singleData) {
singleData.url = item.getAttribute("url");
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("") ) {
singleData.autocompleteType = AutocompleteType.UNCACHED.getValue();
} else {
@ -173,7 +173,7 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
dataMap.put("label", item != null ? item.getAttribute("label") : "");
//dataMap.put("url", item != null ? item.getAttribute("url") : "");
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<>();
NodeList autoCompleteSingles = item.getChildNodes();
for (int i = 0; i < autoCompleteSingles.getLength(); i++) {