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 fe686e9..2ad89be 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 @@ -102,7 +102,6 @@ public class AppController implements SubscriberInterface { private String rootIdentifier = null; // public static boolean isSearchActive = false; - public AppController(AppControllerExplorer appControllerExplorer) { this.appContrExplorer = appControllerExplorer; this.appContrExplorer.subscribe(this, new EventsTypeEnum[] { @@ -258,7 +257,7 @@ public class AppController implements SubscriberInterface { @Override public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) { - if(fileDownloadEvent!=null){ + if(fileDownloadEvent!=null && fileDownloadEvent.getItemIdentifier()!=null){ // FileGridModel fileItem = getGridSelectedItem(); // // String id = fileDownloadEvent.getItemIdentifier()!=null? fileDownloadEvent.getItemIdentifier():""; @@ -636,14 +635,14 @@ public class AppController implements SubscriberInterface { }); - eventBus.addHandler(FileDownloadEvent.TYPE, new FileDownloadEventHandler() { - - @Override - public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) { - AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType())); - - } - }); +// eventBus.addHandler(FileDownloadEvent.TYPE, new FileDownloadEventHandler() { +// +// @Override +// public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) { +// AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType())); +// +// } +// }); eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() { diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java b/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java index 8696d00..e389416 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java @@ -54,6 +54,4 @@ public class ConstantsPortlet { public static final int COOKIE_EXPIRE_DAYS = 30; public static final long MILLISECS_PER_DAY = 1000L * 60L * 60L * 24L; - - } diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java index 5117f57..7622f11 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java @@ -304,10 +304,7 @@ public class GxtToolBarItemFunctionality { final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem(); - AppController.getEventBus().fireEvent( - new FileDownloadEvent(fileGridModel - .getIdentifier(), fileGridModel - .getName(), DownloadType.DOWNLOAD)); + AppController.getEventBus().fireEvent(new FileDownloadEvent(fileGridModel.getIdentifier(), fileGridModel.getName(), DownloadType.DOWNLOAD)); } });