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:
Francesco Mangiacrapa 2013-09-12 14:52:31 +00:00
parent d276d66c93
commit c43ee4ee81
5 changed files with 22 additions and 9 deletions

View File

@ -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){

View File

@ -12,10 +12,13 @@ public class RefreshFolderEvent extends GwtEvent<RefreshItemEventHandler> implem
private FileModel folderTarget= null;
private boolean expandFolder = true; //DEFAULT EXPAND FOLDER
private boolean forceRefresh;
public RefreshFolderEvent(FileModel folderTarget, boolean expandFolder) {
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;
}
}

View File

@ -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);

View File

@ -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));
}
}
});

View File

@ -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);