Fixes bug on DMP doc and pdf export not exporting the "combobox" property when its type is "wordlist".
This commit is contained in:
parent
2276a875ec
commit
fb1dd376fc
|
@ -142,6 +142,11 @@ public class WordBuilder {
|
||||||
number.setVal(BigInteger.valueOf(indent));
|
number.setVal(BigInteger.valueOf(indent));
|
||||||
}
|
}
|
||||||
createFields(compositeField.getFields(), mainDocumentPart, 3, createListing, visibilityRuleService);
|
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) {
|
if (compositeField.getHasCommentField() && compositeField.getCommentFieldValue() != null && !compositeField.getCommentFieldValue().isEmpty() && !createListing) {
|
||||||
XWPFParagraph paragraph = addParagraphContent("Comment: " + compositeField.getCommentFieldValue(), mainDocumentPart, ParagraphStyle.COMMENT, numId);
|
XWPFParagraph paragraph = addParagraphContent("Comment: " + compositeField.getCommentFieldValue(), mainDocumentPart, ParagraphStyle.COMMENT, numId);
|
||||||
CTDecimalNumber number = paragraph.getCTP().getPPr().getNumPr().addNewIlvl();
|
CTDecimalNumber number = paragraph.getCTP().getPPr().getNumPr().addNewIlvl();
|
||||||
|
@ -207,11 +212,7 @@ public class WordBuilder {
|
||||||
});
|
});
|
||||||
return map.get("label");
|
return map.get("label");
|
||||||
} else if (comboboxType.equals("wordlist")) {
|
} else if (comboboxType.equals("wordlist")) {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
return field.getValue();
|
||||||
if (field.getValue() == null) return null;
|
|
||||||
Map<String, String> map = mapper.readValue(field.getValue(), new TypeReference<Map<String, String>>() {
|
|
||||||
});
|
|
||||||
return map.get("label");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "booleanDecision":
|
case "booleanDecision":
|
||||||
|
|
Loading…
Reference in New Issue