Fixes bug on DMP doc and pdf export not exporting the "combobox" property when its type is "wordlist".

This commit is contained in:
gkolokythas 2019-06-05 16:57:05 +03:00
parent 2276a875ec
commit fb1dd376fc
1 changed files with 6 additions and 5 deletions

View File

@ -142,6 +142,11 @@ public class WordBuilder {
number.setVal(BigInteger.valueOf(indent));
}
createFields(compositeField.getFields(), mainDocumentPart, 3, createListing, visibilityRuleService);
if (!compositeField.getMultiplicityItems().isEmpty()) {
for (FieldSet multiplicityFieldset : compositeField.getMultiplicityItems()) {
createFields(multiplicityFieldset.getFields(), mainDocumentPart, 3, createListing, visibilityRuleService);
}
}
if (compositeField.getHasCommentField() && compositeField.getCommentFieldValue() != null && !compositeField.getCommentFieldValue().isEmpty() && !createListing) {
XWPFParagraph paragraph = addParagraphContent("Comment: " + compositeField.getCommentFieldValue(), mainDocumentPart, ParagraphStyle.COMMENT, numId);
CTDecimalNumber number = paragraph.getCTP().getPPr().getNumPr().addNewIlvl();
@ -207,11 +212,7 @@ public class WordBuilder {
});
return map.get("label");
} else if (comboboxType.equals("wordlist")) {
ObjectMapper mapper = new ObjectMapper();
if (field.getValue() == null) return null;
Map<String, String> map = mapper.readValue(field.getValue(), new TypeReference<Map<String, String>>() {
});
return map.get("label");
return field.getValue();
}
}
case "booleanDecision":