correctly update filelist and tree nodes
authorkoutsoub <devnull@localhost>
Tue, 1 Feb 2011 11:19:47 +0000 (13:19 +0200)
committerkoutsoub <devnull@localhost>
Tue, 1 Feb 2011 11:19:47 +0000 (13:19 +0200)
src/gr/ebs/gss/client/CellTreeView.java
src/gr/ebs/gss/client/FileContextMenu.java
src/gr/ebs/gss/client/FileUploadDialog.java
src/gr/ebs/gss/client/FileUploadGearsDialog.java
src/gr/ebs/gss/client/GSS.java

index a5d0ead..81eb5e4 100644 (file)
@@ -579,7 +579,8 @@ public class CellTreeView extends Composite{
 
                                        @Override
                                        public void onComplete() {
-                                               //restResource = getResult();
+                                               if(restResource instanceof RestResourceWrapper)
+                                                       ((RestResourceWrapper)restResource).setResource(getResult());//restResource = getResult();
                                                
                                                if(CellTreeView.this.mymap.get(restResource.getUri())!=null)
                                                        CellTreeView.this.mymap.get(restResource.getUri()).setRestResource(restResource);
@@ -845,4 +846,6 @@ public class CellTreeView extends Composite{
        public interface RefreshHandler{
                void onRefresh();               
        }
+       
+       
 }
index c72bbf0..bd68e37 100644 (file)
@@ -291,6 +291,8 @@ public class FileContextMenu extends PopupPanel implements ClickHandler {
                                        menu = new FileContextMenu(images, false, false);
                                        menu.onMultipleSelection();
                                }*/
+                               menu = new FileContextMenu(images, false, false);
+                               menu.onMultipleSelection();
                                int left = event.getClientX();
                                int top = event.getClientY();
                                menu.setPopupPosition(left, top);
index f53d5b4..0165141 100644 (file)
@@ -231,7 +231,7 @@ public class FileUploadDialog extends DialogBox implements Updateable {
                                }
                                progressBar.setProgress(100);
                                cancelUpload();
-                               GSS.get().getTreeView().updateNode(folder);//showFileList(true);
+                               GSS.get().getTreeView().updateNode(GSS.get().getTreeView().getSelection());
                                GSS.get().getStatusPanel().updateStats();
 
                        }
index 3263ec9..ef5b0f1 100644 (file)
@@ -424,7 +424,7 @@ public class FileUploadGearsDialog extends FileUploadDialog implements Updateabl
        protected void finish() {
                hide();
                //GSS.get().showFileList(true);
-               GSS.get().getTreeView().updateNode(folder);//showFileList(true);
+               GSS.get().getTreeView().updateNode(GSS.get().getTreeView().getSelection());//showFileList(true);
                GSS.get().getStatusPanel().updateStats();
        }
 
index 3a462e9..d5d662d 100644 (file)
@@ -846,7 +846,7 @@ public class GSS implements EntryPoint, ResizeHandler {
        }
        
        public void onResourceUpdate(RestResource resource){
-               if(resource instanceof FolderResource){
+               if(resource instanceof RestResourceWrapper){
                        if(getTreeView().getSelection()!=null&&getTreeView().getSelection().getUri().equals(resource.getUri()))
                                showFileList(resource,true);
                }