diff --git a/.classpath b/.classpath
index 19c15bb..a5a3d5c 100644
--- a/.classpath
+++ b/.classpath
@@ -1,12 +1,12 @@
-
+
-
+
@@ -33,5 +33,5 @@
-
+
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 3f1736c..d56592f 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,45 +1,60 @@
-
+ Updated to PortalContext [ticket #6548]
+
+
Updated support to WorkspaceExplorer [ticket #428]
-
Updated Licenses
Updated dependencies
-
Updated dependency
-
Added more feedback on csv import [issue #3218]
Updated to GWT 2.6.1
Updated to GXT 3.1.1
-
Fixed Final and Lock error
-
Updated monitor
-
Updated Import
Updated Pom
-
Added exclude and include column
-
Updated interacting with workspace
-
First Release
diff --git a/pom.xml b/pom.xml
index 9f1f063..9867a2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
4.0.0
org.gcube.portlets.user
tabular-data-csv-import-widget
- 2.8.0-SNAPSHOT
+ 2.9.0-SNAPSHOT
tabular-data-csv-import-widget
tabular-data-csv-import-widget allows csv import from file and workspace
diff --git a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java
index a5c0887..93ef448 100644
--- a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java
+++ b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java
@@ -3,9 +3,11 @@
*/
package org.gcube.portlets.user.td.csvimportwidget.client;
+import org.gcube.portal.clientcontext.client.GCubeClientContext;
import org.gcube.portlets.user.td.csvimportwidget.client.progress.FileUploadProgressBarUpdater;
import org.gcube.portlets.user.td.csvimportwidget.client.progress.FileUploadProgressListener;
import org.gcube.portlets.user.td.csvimportwidget.client.progress.FileUploadProgressUpdater;
+import org.gcube.portlets.user.td.gwtservice.shared.Constants;
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundle;
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
@@ -14,6 +16,7 @@ import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
+import com.google.gwt.user.client.ui.Hidden;
import com.sencha.gxt.core.client.Style.HideMode;
import com.sencha.gxt.core.client.util.Padding;
import com.sencha.gxt.widget.core.client.ProgressBar;
@@ -36,7 +39,6 @@ import com.sencha.gxt.widget.core.client.form.FormPanel;
*/
public class FileUploadPanel extends FormPanel {
- private static final String UPLOAD_SERVLET = "LocalUploadServlet";
private static final int STATUS_POLLING_DELAY = 1000;
@@ -68,7 +70,13 @@ public class FileUploadPanel extends FormPanel {
}
});
- setAction(GWT.getModuleBaseURL() + UPLOAD_SERVLET);
+
+ StringBuilder actionUrl = new StringBuilder();
+ actionUrl.append(GWT.getModuleBaseURL());
+ actionUrl.append(Constants.LOCAL_UPLOAD_SERVLET);
+ setAction(actionUrl.toString());
+ Log.info("Start Upload action Url " + actionUrl.toString());
+
setWidth("100%");
setEncoding(Encoding.MULTIPART);
@@ -77,7 +85,13 @@ public class FileUploadPanel extends FormPanel {
VerticalLayoutContainer content = new VerticalLayoutContainer();
content.setWidth("100%");
add(content);
-
+
+ Hidden currGroupID = new Hidden();
+ currGroupID.setName(Constants.CURR_GROUP_ID);
+ currGroupID.setValue(GCubeClientContext.getCurrentContextId());
+
+ content.add(currGroupID);
+
fUpField = new FileUploadField();
fUpField.setName("uploadFormElement");
fUpField.setWidth("100%");
@@ -181,12 +195,7 @@ public class FileUploadPanel extends FormPanel {
protected void startUpload() {
disableUpload();
-
- StringBuilder actionUrl = new StringBuilder();
- actionUrl.append(GWT.getModuleBaseURL());
- actionUrl.append(UPLOAD_SERVLET);
- setAction(actionUrl.toString());
- Log.info("Start Upload action Url " + actionUrl.toString());
+
submit();
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);