It is currently Tue Aug 04, 2026 11:43 pm
News of Forums List<Object> texts = getAllElementFromObject(template.getMainDocumentPart(), Text.class);
replacePlaceHolders(texts, mappings);
private static void replacePlaceHolders(List<?> texts,Map<String, String> mappings){
for (Object object : texts) {
Text textElement=(Text)object;
String textToReplace=textElement.getValue();
if(mappings.keySet().contains(textToReplace)){
textElement.setValue(mappings.get(textToReplace));
}
}
}
Total posts 10234 • Total topics 2888 • Total members 2109