Updated constants

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@121713 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-12-09 13:22:40 +00:00
parent d29d5f88d0
commit b63917c05a
2 changed files with 28 additions and 0 deletions

View File

@ -14,6 +14,9 @@ public class ConstantsWorkspaceUploader {
public static final String WORKSPACE_UPLOADER_SERVLET = GWT.getModuleBaseURL() + "workspaceUploadServlet";
public static final String WORKSPACE_UPLOADER_SERVLET_STREAM = GWT.getModuleBaseURL() + "workspaceUploadServletStream";
public static final String WORKSPACE_UPLOADER_SERVICE = GWT.getModuleBaseURL() + "workspaceUploaderService";
public static final String SERVER_ERROR = "Sorry, an error has occurred on the server when";
public static final String TRY_AGAIN = "Try again";

View File

@ -35,6 +35,8 @@ public class MultipleDNDUpload extends LayoutPanel implements
// private String jsonKeys;
private String servlet = ConstantsWorkspaceUploader.WORKSPACE_UPLOADER_SERVLET_STREAM;
private String service = ConstantsWorkspaceUploader.WORKSPACE_UPLOADER_SERVICE;
public static final String FILE_DELEMITER = ";";
private Widget onlyChild;
@ -606,6 +608,29 @@ public class MultipleDNDUpload extends LayoutPanel implements
$wnd.$('#drop_target')[0].innerHTML = 'Your browser does not support the HTML5 FileReader.';
}
}-*/;
public static native void test(String parentIdentifier, String name)/*-{
var servlet = instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::service;
var jqxhr = $.get("itemExistsInWorkpaceFolder?", function() {
alert( "success" );
})
.done(function() {
alert( "second success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "finished" );
});
// Perform other work here ...
// Set another completion function for the request above
jqxhr.always(function() {
alert( "second finished" );
});
}-*/;
/*
* (non-Javadoc)