Fixed: refresh for smart folder
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@82373 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9ee2dbe224
commit
569db18c6a
12
pom.xml
12
pom.xml
|
@ -160,12 +160,12 @@
|
||||||
<version>[6.0.0-SNAPSHOT, 7.0.0-SNAPSHOT)</version>
|
<version>[6.0.0-SNAPSHOT, 7.0.0-SNAPSHOT)</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>org.gcube.contentmanagement</groupId>
|
<!-- <groupId>org.gcube.contentmanagement</groupId> -->
|
||||||
<artifactId>storage-resource-link-plugin</artifactId>
|
<!-- <artifactId>storage-resource-link-plugin</artifactId> -->
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
||||||
<scope>provided</scope>
|
<!-- <scope>provided</scope> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>wsmail-widget</artifactId>
|
<artifactId>wsmail-widget</artifactId>
|
||||||
|
|
|
@ -113,9 +113,8 @@ public class AppController implements SubscriberInterface {
|
||||||
private String rootIdentifier = null;
|
private String rootIdentifier = null;
|
||||||
// public static boolean isSearchActive = false;
|
// public static boolean isSearchActive = false;
|
||||||
private HasWidgets rootPanel;
|
private HasWidgets rootPanel;
|
||||||
|
private String selectedSmartFolderId;
|
||||||
|
private String selectedSmartFolderCategory;
|
||||||
|
|
||||||
|
|
||||||
public AppController(AppControllerExplorer appControllerExplorer) {
|
public AppController(AppControllerExplorer appControllerExplorer) {
|
||||||
this.appContrExplorer = appControllerExplorer;
|
this.appContrExplorer = appControllerExplorer;
|
||||||
|
@ -276,8 +275,15 @@ public class AppController implements SubscriberInterface {
|
||||||
public void onGridRefresh(GridRefreshEvent gridRefreshEvent) {
|
public void onGridRefresh(GridRefreshEvent gridRefreshEvent) {
|
||||||
|
|
||||||
if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
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
|
//CREATE FOLDER PARENT FOR RPC
|
||||||
// FolderModel folder = new FolderModel(parent.getIdentifier(), parent.getName(), parent.getParentFileModel(), true, parent.isShared());
|
// FolderModel folder = new FolderModel(parent.getIdentifier(), parent.getName(), parent.getParentFileModel(), true, parent.isShared());
|
||||||
updateStoreByRpc(parent);
|
updateStoreByRpc(parent);
|
||||||
|
@ -467,6 +473,7 @@ public class AppController implements SubscriberInterface {
|
||||||
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
||||||
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
||||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
||||||
|
resetSmartFolderSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("FILE MODEL DOUBLE CLICK: "+fileModel);
|
System.out.println("FILE MODEL DOUBLE CLICK: "+fileModel);
|
||||||
|
@ -819,6 +826,11 @@ public class AppController implements SubscriberInterface {
|
||||||
return wsPortlet.getGridGroupContainer().getSelectedItem();
|
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){
|
private void updateStoreByRpc(final FileModel folder){
|
||||||
|
|
||||||
|
resetSmartFolderSelected();
|
||||||
|
|
||||||
if(folder==null)
|
if(folder==null)
|
||||||
return;
|
return;
|
||||||
|
@ -1067,9 +1080,9 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
||||||
|
|
||||||
System.out.println("In client new RPC getFolderChildrenForFileGrid "+parent.getName());
|
// System.out.println("In client new RPC getFolderChildrenForFileGrid "+parent.getName());
|
||||||
|
//
|
||||||
System.out.println(parent);
|
// System.out.println(parent);
|
||||||
|
|
||||||
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGrid(parent, new AsyncCallback<List<FileGridModel>>() {
|
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGrid(parent, new AsyncCallback<List<FileGridModel>>() {
|
||||||
|
|
||||||
|
@ -1138,6 +1151,9 @@ public class AppController implements SubscriberInterface {
|
||||||
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
||||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
||||||
// setSearchActive(false);
|
// setSearchActive(false);
|
||||||
|
|
||||||
|
resetSmartFolderSelected();
|
||||||
|
|
||||||
updatGridViewForSelectedItem(item);
|
updatGridViewForSelectedItem(item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1208,9 +1224,11 @@ public class AppController implements SubscriberInterface {
|
||||||
@Override
|
@Override
|
||||||
public void smartFolderSelected(final String folderId, final String category) {
|
public void smartFolderSelected(final String folderId, final String category) {
|
||||||
|
|
||||||
|
selectedSmartFolderId = folderId;
|
||||||
|
selectedSmartFolderCategory = category;
|
||||||
|
|
||||||
System.out.println("In client folderId: " + folderId);
|
GWT.log("Smart folder selected, folderId: " + selectedSmartFolderId);
|
||||||
System.out.println("In client category: " + category);
|
GWT.log("Smart folder selected, category: " + selectedSmartFolderCategory);
|
||||||
|
|
||||||
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
||||||
|
|
||||||
|
@ -1289,6 +1307,8 @@ public class AppController implements SubscriberInterface {
|
||||||
@Override
|
@Override
|
||||||
public void refreshFolder(FileModel folderTarget, boolean forceRefresh) {
|
public void refreshFolder(FileModel folderTarget, boolean forceRefresh) {
|
||||||
|
|
||||||
|
resetSmartFolderSelected();
|
||||||
|
|
||||||
if(folderTarget!=null){
|
if(folderTarget!=null){
|
||||||
|
|
||||||
if(forceRefresh){
|
if(forceRefresh){
|
||||||
|
|
Loading…
Reference in New Issue