diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index d752c46d9a0..251f3865104 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -1660,15 +1660,7 @@ public void setSelectedTemplate(Template selectedTemplate) { public void updateSelectedTemplate(ValueChangeEvent event) { selectedTemplate = (Template) event.getNewValue(); - if (selectedTemplate != null) { - //then create new working version from the selected template - workingVersion.updateDefaultValuesFromTemplate(selectedTemplate); - updateDatasetFieldInputLevels(); - } else { - workingVersion.initDefaultValues(licenseServiceBean.getDefault()); - updateDatasetFieldInputLevels(); - } - resetVersionUI(); + } /* @@ -1762,6 +1754,21 @@ public void handleChange() { public void handleChangeButton() { + if (selectedTemplate != null) { + //then create new working version from the selected template + workingVersion.updateDefaultValuesFromTemplate(selectedTemplate); + updateDatasetFieldInputLevels(); + } else { + workingVersion.initDefaultValues(licenseServiceBean.getDefault()); + updateDatasetFieldInputLevels(); + } + /* + Issue 8646: necessary for the access popup which is shared by the dataset page and the file page + */ + setFileAccessRequest(workingVersion.getTermsOfUseAndAccess().isFileAccessRequest()); + setTermsOfAccess(workingVersion.getTermsOfUseAndAccess().getTermsOfAccess()); + + resetVersionUI(); } public boolean isShapefileType(FileMetadata fm) {