diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java b/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java index 3051186..2004648 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java @@ -1960,28 +1960,28 @@ public class AppController implements SubscriberInterface { * @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#pasteEventIsCompleted() */ @Override - public void moveEventIsCompleted(boolean refreshingTheTree, String parentId) { + public void moveEventIsCompleted(boolean refreshingTheTree, String destinationFolderId) { wsPortlet.getGridGroupContainer().unmask(); if(refreshingTheTree){ wsPortlet.getGridGroupContainer().unmask(); }else{ //FORCE GRID REFRESH - FileModel theFolder = wsPortlet.getToolBarPath().getParentFolder(parentId); + FileModel theFolder = wsPortlet.getToolBarPath().getParentFolder(destinationFolderId); GWT.log("moveEventIsCompleted tree is not refreshable"); if(theFolder!=null){ //THE FOLDER IS IN THE BREADCRUMB - GWT.log("Comparing breadcrumb id: "+theFolder.getIdentifier() + " and parent id: "+parentId); - if(theFolder.getIdentifier().compareToIgnoreCase(parentId)==0){ + GWT.log("Comparing breadcrumb id: "+theFolder.getIdentifier() + " and parent id: "+destinationFolderId); + if(theFolder.getIdentifier().compareToIgnoreCase(destinationFolderId)==0){ eventBus.fireEvent(new GridRefreshEvent()); } }else{ //MOVING HAS BEEN PERFORMED IN A FOLDER MISSING IN THE BREADCRUMB, SO LOADING IT A NEW ONE //FOR DISPLAYING - GWT.log("Loading grid on the parent folder of: "+parentId); + GWT.log("Loading grid on the parent folder of: "+destinationFolderId); - AppControllerExplorer.rpcWorkspaceService.getParentByItemId(parentId, new AsyncCallback() { + AppControllerExplorer.rpcWorkspaceService.getParentByItemId(destinationFolderId, new AsyncCallback() { @Override public void onFailure(Throwable caught) { @@ -2001,13 +2001,21 @@ public class AppController implements SubscriberInterface { } - /* (non-Javadoc) * @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#copyEventIsCompleted() */ @Override - public void copyEventIsCompleted() { - //wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activePasteButton(true); + public void copyEventIsCompleted(String destinationFolderId) { + + wsPortlet.getGridGroupContainer().unmask(); + FileModel theFolder = wsPortlet.getToolBarPath().getParentFolder(destinationFolderId); + if(theFolder!=null){ + //THE FOLDER IS IN THE BREADCRUMB + GWT.log("Comparing breadcrumb id: "+theFolder.getIdentifier() + " and destination folder id: "+destinationFolderId); + if(theFolder.getIdentifier().compareToIgnoreCase(destinationFolderId)==0){ + eventBus.fireEvent(new GridRefreshEvent()); + } + } }