diff --git a/src/main/java/com/databasepreservation/common/client/common/dialogs/DatabaseSelectDialog.java b/src/main/java/com/databasepreservation/common/client/common/dialogs/DatabaseSelectDialog.java index 74113864..fe3df598 100644 --- a/src/main/java/com/databasepreservation/common/client/common/dialogs/DatabaseSelectDialog.java +++ b/src/main/java/com/databasepreservation/common/client/common/dialogs/DatabaseSelectDialog.java @@ -159,30 +159,30 @@ public void updateExcludedInfo() { + " " + messages.manageDatabaseSearchAllExcludedPrivacy(this.notSearchable)))); } - public void writeSelectedObjectsToLocalStorage() { - Storage localStorage = Storage.getLocalStorageIfSupported(); - if (localStorage != null) { + public void writeSelectedObjectsToSessionStorage() { + Storage sessionStorage = Storage.getSessionStorageIfSupported(); + if (sessionStorage != null) { SelectedItems selectedItems = this.list.getSelected(); if (selectedItems instanceof SelectedItemsList) { - localStorage.setItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION, + sessionStorage.setItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION, String.join(",", ((SelectedItemsList) selectedItems).getIds())); } else if (selectedItems instanceof SelectedItemsFilter) { - localStorage.setItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION, + sessionStorage.setItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION, ViewerConstants.SEARCH_ALL_SELECTED_ALL); } } } private void confirmHandler() { - this.writeSelectedObjectsToLocalStorage(); + this.writeSelectedObjectsToSessionStorage(); this.doParentSearch(); this.hide(); } private void cancelHandler() { - Storage localStorage = Storage.getLocalStorageIfSupported(); - if (localStorage != null) { - String uuidsString = localStorage.getItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION); + Storage sessionStorage = Storage.getSessionStorageIfSupported(); + if (sessionStorage != null) { + String uuidsString = sessionStorage.getItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION); if (uuidsString != null && !uuidsString.equals(ViewerConstants.SEARCH_ALL_SELECTED_ALL)) { List selectedUUIDs = new ArrayList<>(); if (!uuidsString.isEmpty()) { @@ -201,11 +201,11 @@ private void clearHandler() { } private void doParentSearch() { - Storage localStorage = Storage.getLocalStorageIfSupported(); + Storage sessionStorage = Storage.getSessionStorageIfSupported(); List selectedUUIDs = null; boolean selectedAll = false; - if (localStorage != null) { - String uuidsString = localStorage.getItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION); + if (sessionStorage != null) { + String uuidsString = sessionStorage.getItem(ViewerConstants.LOCAL_STORAGE_SEARCH_ALL_SELECTION); if (uuidsString != null) { if (uuidsString.equals(ViewerConstants.SEARCH_ALL_SELECTED_ALL)) { selectedAll = true;