Fix multiList on xml export
This commit is contained in:
parent
2390a33a98
commit
7b800b2347
|
@ -205,6 +205,7 @@ public class ExportXmlBuilderDatasetProfile {
|
|||
WordListData wordListDataObject = (WordListData) field.getData();
|
||||
dataOut.setAttribute("label", wordListDataObject.getLabel());
|
||||
dataOut.setAttribute("type", wordListDataObject.getType());
|
||||
dataOut.setAttribute("multiList", wordListDataObject.getMultiList().toString());
|
||||
Element options = element.createElement("options");
|
||||
wordListDataObject.getOptions().forEach(optionChildFor -> {
|
||||
Element optionChild = element.createElement("option");
|
||||
|
|
|
@ -78,7 +78,8 @@ public class WordListData extends ComboBoxData<WordListData> {
|
|||
this.options.add(newOption);
|
||||
}
|
||||
}
|
||||
this.multiList = (Boolean) ((Map<String, Object>) data).get("multiList");
|
||||
Object multiList1 = ((Map<String, Object>) data).get("multiList");
|
||||
this.multiList = multiList1 instanceof String ? Boolean.parseBoolean((String) multiList1) : (Boolean) multiList1;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -92,6 +93,7 @@ public class WordListData extends ComboBoxData<WordListData> {
|
|||
@Override
|
||||
public Map<String, Object> toMap(Element item) {
|
||||
HashMap dataMap = new HashMap();
|
||||
dataMap.put("multiList", item != null ? item.getAttribute("multiList") : "false");
|
||||
dataMap.put("label", item != null ? item.getAttribute("label") : "");
|
||||
dataMap.put("type", item != null ? item.getAttribute("type") : "wordlist");
|
||||
Element optionsElement = (Element) item.getElementsByTagName("options").item(0);
|
||||
|
|
Loading…
Reference in New Issue