diff --git a/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/CSVWorkSpaceSelectionCard.java b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/CSVWorkSpaceSelectionCard.java
new file mode 100644
index 0000000..da429be
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/CSVWorkSpaceSelectionCard.java
@@ -0,0 +1,158 @@
+/**
+ *
+ */
+package org.gcube.portlets.user.td.csvexportwidget.client;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gcube.portlets.user.td.csvexportwidget.client.workspace.WorkspacePanel;
+import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
+import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
+import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
+import org.gcube.portlets.widgets.lighttree.client.Item;
+import org.gcube.portlets.widgets.lighttree.client.ItemType;
+import org.gcube.portlets.widgets.lighttree.client.event.ItemSelectionEvent;
+import org.gcube.portlets.widgets.lighttree.client.event.ItemSelectionHandler;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.user.client.Command;
+import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
+
+/**
+ *
+ * @author "Giancarlo Panichi" g.panichi@isti.cnr.it
+ *
+ */
+public class CSVWorkSpaceSelectionCard extends WizardCard {
+
+ protected CSVExportSession exportSession;
+ protected CSVWorkSpaceSelectionCard thisCard;
+
+
+ protected Item item;
+ protected VerticalLayoutContainer p;
+ protected WorkspacePanel wpanel;
+
+ public CSVWorkSpaceSelectionCard(final CSVExportSession exportSession) {
+ super("CSV Export in Workspace", "");
+
+ this.exportSession = exportSession;
+ thisCard = this;
+
+ p=new VerticalLayoutContainer();
+
+ Log.debug("Set Workspace Panel");
+ wpanel=new WorkspacePanel();
+ wpanel.setSpWidth("536px");
+ wpanel.setSpHeight("384px");
+ List lItemType= new ArrayList();
+ lItemType.add(ItemType.ROOT);
+ lItemType.add(ItemType.FOLDER);
+ wpanel.setShowableTypes(lItemType);
+ wpanel.setSelectableTypes(lItemType);
+ wpanel.addSelectionHandler(new ItemSelectionHandler() {
+
+ @Override
+ public void onSelection(ItemSelectionEvent event) {
+ item=event.getSelectedItem();
+ Log.debug("Selected Item:"+item);
+ if(item.getType()==ItemType.FOLDER || item.getType()==ItemType.ROOT){
+ /*String filename=item.getName();
+ if(filename!=null&&!filename.isEmpty()){
+ Log.debug("Item name: "+filename);
+ Log.debug("Item path: "+item.getPath());
+
+ importSession.setItemId(item.getId());
+ getWizardWindow().setEnableNextButton(true);
+
+ } else {
+ Log.debug("Item name null or empty");
+ getWizardWindow().setEnableNextButton(false);
+ }*/
+
+ } else {
+ Log.debug("Item type:"+item.getType());
+ getWizardWindow().setEnableNextButton(false);
+ }
+ }
+ });
+ p.add(wpanel);
+ wpanel.loadTree();
+ setContent(p);
+
+ }
+
+
+
+
+ @Override
+ public void setup() {
+ Log.debug("CSVWorkSpaceSelectionCard Call Setup ");
+ Command sayNextCard = new Command() {
+
+ @Override
+ public void execute() {
+ Log.debug("CSVWorkSpaceSelectionCard Call sayNextCard wpanel:"+wpanel);
+ wpanel.disable();
+ wpanel.startWaiting();
+ getWizardWindow().setEnableNextButton(false);
+ getWizardWindow().setEnableBackButton(false);
+ getFileFromWorkspace();
+ }
+
+ };
+
+ getWizardWindow().setNextButtonCommand(sayNextCard);
+
+ Command sayPreviousCard = new Command() {
+ public void execute() {
+ try {
+ getWizardWindow().previousCard();
+ getWizardWindow().removeCard(thisCard);
+ Log.debug("Remove CSVWorkSpaceSelectionCard");
+ } catch (Exception e) {
+ Log.error("sayPreviousCard :" + e.getLocalizedMessage());
+ }
+ }
+ };
+
+ getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
+ getWizardWindow().setEnableNextButton(false);
+
+ }
+
+ protected void getFileFromWorkspace(){
+ TDGWTServiceAsync tdGwtServiceAsync=TDGWTServiceAsync.INSTANCE;
+ /*tdGwtServiceAsync.setFileInWorkspace(exportSession, new AsyncCallback(){
+
+ @Override
+ public void onFailure(Throwable caught) {
+ wpanel.endWaiting();
+ thisCard.showErrorAndHide("Error", "Error retrieving the file from the workspace: "+caught.getLocalizedMessage(),
+ caught.toString(), caught);
+
+ }
+
+ @Override
+ public void onSuccess(Void result) {
+ wpanel.endWaiting();
+ goForward();
+
+ }
+
+ });
+ */
+ }
+
+ protected void goForward(){
+ /*CSVConfigCard csvConfigCard = new CSVConfigCard(importSession);
+ getWizardWindow().addCard(csvConfigCard);
+ Log.info("NextCard CSVConfigCard");
+ getWizardWindow().nextCard();*/
+
+ }
+
+
+}