refresh folder forced was added
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@81314 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d276d66c93
commit
c43ee4ee81
|
@ -219,7 +219,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
if(result)
|
||||
eventBus.fireEvent(new RefreshFolderEvent(source.getParentFileModel(), true));
|
||||
eventBus.fireEvent(new RefreshFolderEvent(source.getParentFileModel(), true, false));
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -332,7 +332,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
else
|
||||
parentToRefresh = parentFileModel;
|
||||
|
||||
eventBus.fireEvent(new RefreshFolderEvent(parentToRefresh, true));
|
||||
eventBus.fireEvent(new RefreshFolderEvent(parentToRefresh, true, false));
|
||||
GWT.log("share completed refresh folder : "+parentModel.getName());
|
||||
}
|
||||
explorerPanel.unmask();
|
||||
|
@ -548,7 +548,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
public void onSuccess(Boolean result) {
|
||||
|
||||
if(result)
|
||||
eventBus.fireEvent(new RefreshFolderEvent(explorerPanel.getAsycTreePanel().getFileModelByIdentifier(pasteItemEvent.getFolderDestinationId()), false));
|
||||
eventBus.fireEvent(new RefreshFolderEvent(explorerPanel.getAsycTreePanel().getFileModelByIdentifier(pasteItemEvent.getFolderDestinationId()), false, true));
|
||||
|
||||
notifySubscriber(pasteItemEvent);
|
||||
}
|
||||
|
@ -1652,7 +1652,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
RefreshFolderEvent refresh = (RefreshFolderEvent) event;
|
||||
|
||||
sub.refreshFolder(refresh.getFolderTarget());
|
||||
sub.refreshFolder(refresh.getFolderTarget(), refresh.isForceRefresh());
|
||||
|
||||
}else if(event instanceof SendMessageEvent){
|
||||
|
||||
|
|
|
@ -13,9 +13,12 @@ public class RefreshFolderEvent extends GwtEvent<RefreshItemEventHandler> implem
|
|||
|
||||
private boolean expandFolder = true; //DEFAULT EXPAND FOLDER
|
||||
|
||||
public RefreshFolderEvent(FileModel folderTarget, boolean expandFolder) {
|
||||
private boolean forceRefresh;
|
||||
|
||||
public RefreshFolderEvent(FileModel folderTarget, boolean expandFolder, boolean forceRefresh) {
|
||||
this.folderTarget = folderTarget;
|
||||
this.expandFolder = expandFolder;
|
||||
this.forceRefresh = forceRefresh;
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,4 +51,14 @@ public class RefreshFolderEvent extends GwtEvent<RefreshItemEventHandler> implem
|
|||
public void setExpandFolder(boolean expandFolder) {
|
||||
this.expandFolder = expandFolder;
|
||||
}
|
||||
|
||||
|
||||
public boolean isForceRefresh() {
|
||||
return forceRefresh;
|
||||
}
|
||||
|
||||
|
||||
public void setForceRefresh(boolean forceRefresh) {
|
||||
this.forceRefresh = forceRefresh;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public interface SubscriberInterface {
|
|||
void smartFolderSelected(String folderId, String category);
|
||||
void movedItems(String sourceParentIdentifier, FileModel targetParent);
|
||||
void switchView(ViewSwitchType type);
|
||||
void refreshFolder(FileModel fileModel);
|
||||
void refreshFolder(FileModel fileModel, boolean forzed);
|
||||
// void updatePrevieMessage(String fromLogin, String subject, String date, String body, List<FileModel> attachs);
|
||||
|
||||
void createNewMessage(HashMap<String, String> hashAttachs);
|
||||
|
|
|
@ -561,7 +561,7 @@ public class ContextMenuTree {
|
|||
public void componentSelected(MenuEvent ce) {
|
||||
|
||||
for (FileModel sel : listSelectedItems) {
|
||||
eventBus.fireEvent(new RefreshFolderEvent(sel, true));
|
||||
eventBus.fireEvent(new RefreshFolderEvent(sel, true, false));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -74,10 +74,10 @@ public class WsUtil {
|
|||
|
||||
/*USE ANOTHER ACCOUNT (OTHERWHISE BY TEST_USER) FOR RUNNING
|
||||
* COMMENT THIS IN DEVELOP ENVIROMENT (UNCOMMENT IN PRODUCTION)*/
|
||||
// user=TEST_USER;
|
||||
user=TEST_USER;
|
||||
|
||||
//UNCOMMENT THIS IN DEVELOP ENVIROMENT
|
||||
user = "francesco.mangiacrapa";
|
||||
// user = "francesco.mangiacrapa";
|
||||
|
||||
defaultLogger.warn("WORKSPACE PORTLET STARTING IN TEST MODE - NO USER FOUND - PORTLETS STARTING WITH FOLLOWING SETTINGS:");
|
||||
defaultLogger.warn("session id: "+sessionID);
|
||||
|
|
Loading…
Reference in New Issue