Skip to content

Commit

Permalink
change setting of default mode to edit from property to in init method
Browse files Browse the repository at this point in the history
  • Loading branch information
gdurand committed Apr 16, 2020
1 parent 75f3b69 commit c2ea098
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/edu/harvard/iq/dataverse/EditDatafilesPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
public class EditDatafilesPage implements java.io.Serializable {

private static final Logger logger = Logger.getLogger(EditDatafilesPage.class.getCanonicalName());
private FileView fileView;
private boolean uploadWarningMessageIsNotAnError;

public enum FileEditMode {
Expand Down Expand Up @@ -147,15 +146,14 @@ public enum FileEditMode {
@Inject ProvPopupFragmentBean provPopupFragmentBean;
@Inject
SettingsWrapper settingsWrapper;
private final DateFormat displayDateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM);

private Dataset dataset = new Dataset();

private FileReplacePageHelper fileReplacePageHelper;


private String selectedFileIdsString = null;
private FileEditMode mode = FileEditMode.EDIT;
private FileEditMode mode;
private List<Long> selectedFileIdsList = new ArrayList<>();
private List<FileMetadata> fileMetadatas = new ArrayList<>();;

Expand Down Expand Up @@ -474,6 +472,10 @@ public String initCreateMode(String modeToken, DatasetVersion version, List<Data


public String init() {
// default mode should be EDIT
if (mode == null) {
mode = FileEditMode.EDIT;
}

newFiles = new ArrayList<>();
uploadedFiles = new ArrayList<>();
Expand Down Expand Up @@ -582,7 +584,7 @@ public String init() {
if (fileMetadatas.get(0).getDatasetVersion().getId() != null){
versionString = "DRAFT";
}
}
}

}

Expand Down

0 comments on commit c2ea098

Please sign in to comment.