diff --git a/pom.xml b/pom.xml
index dd1bed5..daede1c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -160,12 +160,12 @@
[6.0.0-SNAPSHOT, 7.0.0-SNAPSHOT)
provided
-
- org.gcube.contentmanagement
- storage-resource-link-plugin
- [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
- provided
-
+
+
+
+
+
+
org.gcube.portlets.user
wsmail-widget
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 2ecebdb..1c08d67 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
@@ -113,10 +113,9 @@ public class AppController implements SubscriberInterface {
private String rootIdentifier = null;
// public static boolean isSearchActive = false;
private HasWidgets rootPanel;
+ private String selectedSmartFolderId;
+ private String selectedSmartFolderCategory;
-
-
-
public AppController(AppControllerExplorer appControllerExplorer) {
this.appContrExplorer = appControllerExplorer;
this.appContrExplorer.subscribe(this, new EventsTypeEnum[] {
@@ -276,8 +275,15 @@ public class AppController implements SubscriberInterface {
public void onGridRefresh(GridRefreshEvent gridRefreshEvent) {
if(wsPortlet.getToolBarPath().getLastParent()!=null){
- FileModel parent = wsPortlet.getToolBarPath().getLastParent();
+ //ID DISPLAYED SMART FOLDER CONTENTS?
+ if(selectedSmartFolderId!=null || selectedSmartFolderCategory!=null){
+
+ smartFolderSelected(selectedSmartFolderId, selectedSmartFolderCategory);
+ return;
+ }
+
+ FileModel parent = wsPortlet.getToolBarPath().getLastParent();
//CREATE FOLDER PARENT FOR RPC
// FolderModel folder = new FolderModel(parent.getIdentifier(), parent.getName(), parent.getParentFileModel(), true, parent.isShared());
updateStoreByRpc(parent);
@@ -467,6 +473,7 @@ public class AppController implements SubscriberInterface {
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
+ resetSmartFolderSelected();
}
System.out.println("FILE MODEL DOUBLE CLICK: "+fileModel);
@@ -818,6 +825,11 @@ public class AppController implements SubscriberInterface {
private FileGridModel getGridSelectedItem(){
return wsPortlet.getGridGroupContainer().getSelectedItem();
}
+
+ private void resetSmartFolderSelected(){
+ selectedSmartFolderId = null;
+ selectedSmartFolderCategory = null;
+ }
/**
@@ -1058,6 +1070,7 @@ public class AppController implements SubscriberInterface {
private void updateStoreByRpc(final FileModel folder){
+ resetSmartFolderSelected();
if(folder==null)
return;
@@ -1067,9 +1080,9 @@ public class AppController implements SubscriberInterface {
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
- System.out.println("In client new RPC getFolderChildrenForFileGrid "+parent.getName());
-
- System.out.println(parent);
+// System.out.println("In client new RPC getFolderChildrenForFileGrid "+parent.getName());
+//
+// System.out.println(parent);
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGrid(parent, new AsyncCallback>() {
@@ -1138,6 +1151,9 @@ public class AppController implements SubscriberInterface {
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
// setSearchActive(false);
+
+ resetSmartFolderSelected();
+
updatGridViewForSelectedItem(item);
return;
}
@@ -1208,10 +1224,12 @@ public class AppController implements SubscriberInterface {
@Override
public void smartFolderSelected(final String folderId, final String category) {
-
- System.out.println("In client folderId: " + folderId);
- System.out.println("In client category: " + category);
-
+ selectedSmartFolderId = folderId;
+ selectedSmartFolderCategory = category;
+
+ GWT.log("Smart folder selected, folderId: " + selectedSmartFolderId);
+ GWT.log("Smart folder selected, category: " + selectedSmartFolderCategory);
+
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
@@ -1289,6 +1307,8 @@ public class AppController implements SubscriberInterface {
@Override
public void refreshFolder(FileModel folderTarget, boolean forceRefresh) {
+ resetSmartFolderSelected();
+
if(folderTarget!=null){
if(forceRefresh){