import gr.ebs.gss.client.rest.RestException;
import gr.ebs.gss.client.rest.resource.FileResource;
import gr.ebs.gss.client.rest.resource.FolderResource;
+import gr.ebs.gss.client.rest.resource.RestResourceWrapper;
import java.util.ArrayList;
import java.util.Arrays;
info.addStyleName("gss-uploadNote");
panel.add(info);
// Add an informative label with the folder name.
- Object selection = GSS.get().getFolders().getCurrent().getUserObject();
- folder = (FolderResource) selection;
+ Object selection = GSS.get().getTreeView().getSelection();
+ folder = ((RestResourceWrapper) selection).getResource();
browse = new Button("Browse...");
@Override
public void onClick(ClickEvent event) {
canContinue = false;
- cancelUpload();
+ cancelUpload();
+ GSS.get().showFileList(true);
}
});
buttons.add(cancel);
private void cancelUpload() {
for (HttpRequest request: requests)
request.abort();
- hide();
+ hide();
}
/**
case 201: // Created falls through to updated.
case 204:
filesRemaining.remove(0);
- if(filesRemaining.isEmpty()){
- selectedFiles = filesRemaining;
+ if(filesRemaining.isEmpty()){
finish();
break;
- }
- selectedFiles = filesRemaining;
+ }
doSend(filesRemaining);
break;
case 403:
* Perform the final actions after the files are uploaded.
*/
protected void finish() {
- if (!selectedFiles.isEmpty()) return;
hide();
- GSS.get().showFileList(true);
+ //GSS.get().showFileList(true);
+ GSS.get().getTreeView().updateNode(GSS.get().getTreeView().getSelection());//showFileList(true);
GSS.get().getStatusPanel().updateStats();
}