When exporting external dataset fields, export and it's type

This commit is contained in:
George Kalampokis 2021-06-23 17:29:45 +03:00
parent ef7de5efe3
commit a48ac5fa0f
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package eu.eudat.logic.utilities.documents.xml;
import eu.eudat.logic.services.forms.VisibilityRuleService;
import eu.eudat.logic.utilities.builders.XmlBuilder;
import eu.eudat.models.data.components.commons.datafield.ExternalDatasetsData;
import eu.eudat.models.data.user.components.datasetprofile.Field;
import eu.eudat.models.data.user.components.datasetprofile.FieldSet;
import eu.eudat.models.data.user.components.datasetprofile.Section;
@ -92,6 +93,9 @@ public class ExportXmlBuilder {
if (visibilityRuleService.isElementVisible(field.getId())) {
Element elementField = element.createElement("field");
elementField.setAttribute("id", field.getId());
if (field.getViewStyle().getRenderStyle().equals("externalDatasets")) {
elementField.setAttribute("type", ((ExternalDatasetsData)field.getData()).getType());
}
if (field.getValue() != null) {
Element valueField = element.createElement("value");
try {