From 6682c68bef71036d7b61b894ec47fd398ecd87f2 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 18 Nov 2013 15:30:06 +0000 Subject: [PATCH] Minor updated git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-export-widget@85628 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 23 +++++++++- .../client/DestinationSelectionCard.java | 44 +++++++++---------- 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index 1b80a30..dbe7e4d 100644 --- a/pom.xml +++ b/pom.xml @@ -104,13 +104,32 @@ 3.0.1 - + + + + org.gcube.portlets.widgets + workspace-light-tree + + provided + + + org.gcube.common + home-library + [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT) + provided + + + org.gcube.portlets.user + gcube-widgets + provided + + org.gcube.portlets.user tabular-data-gwt-service - 1.0.0-SNAPSHOT + [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) diff --git a/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/DestinationSelectionCard.java b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/DestinationSelectionCard.java index 258736d..7f06583 100644 --- a/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/DestinationSelectionCard.java +++ b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/DestinationSelectionCard.java @@ -43,31 +43,31 @@ public class DestinationSelectionCard extends WizardCard { destinationSelectionPanel.setStylePrimaryName(res.wizardCSS() .getImportSelectionSources()); - Radio radioFileSource = new Radio(); - radioFileSource.setBoxLabel("

" + Radio radioFileDestination = new Radio(); + radioFileDestination.setBoxLabel("

" + fileDestination.getName() + "
" + fileDestination.getDescription() + "

"); - radioFileSource.setName(fileDestination.getName()); - radioFileSource.setStylePrimaryName(res.wizardCSS() + radioFileDestination.setName(fileDestination.getName()); + radioFileDestination.setStylePrimaryName(res.wizardCSS() .getImportSelectionSource()); - radioFileSource.setValue(true); + radioFileDestination.setValue(true); - Radio radioWorkspaceSource = new Radio(); - radioWorkspaceSource.setBoxLabel("

" + Radio radioWorkspaceDestination = new Radio(); + radioWorkspaceDestination.setBoxLabel("

" + workspaceDestination.getName() + "
" + workspaceDestination.getDescription() + "

"); - radioWorkspaceSource.setName(workspaceDestination.getName()); - radioWorkspaceSource.setStylePrimaryName(res.wizardCSS() + radioWorkspaceDestination.setName(workspaceDestination.getName()); + radioWorkspaceDestination.setStylePrimaryName(res.wizardCSS() .getImportSelectionSource()); // radioWorkspaceSource.disable(); - destinationSelectionPanel.add(radioFileSource); - destinationSelectionPanel.add(radioWorkspaceSource); + destinationSelectionPanel.add(radioFileDestination); + destinationSelectionPanel.add(radioWorkspaceDestination); // we can set name on radios or use toggle group ToggleGroup toggle = new ToggleGroup(); - toggle.add(radioWorkspaceSource); - toggle.add(radioFileSource); + toggle.add(radioWorkspaceDestination); + toggle.add(radioFileDestination); toggle.addValueChangeHandler(new ValueChangeHandler>() { @@ -106,26 +106,26 @@ public class DestinationSelectionCard extends WizardCard { Command sayNextCard = new Command() { public void execute() { try { - String sourceId = exportSession.getDestination().getId(); - if (sourceId == null || sourceId.isEmpty()) { - Log.error("CSV Import Source Id: " + sourceId); + String destinationId = exportSession.getDestination().getId(); + if (destinationId == null || destinationId.isEmpty()) { + Log.error("CSV Export Source Id: " + destinationId); } else { - if (sourceId.compareTo("File") == 0) { + if (destinationId.compareTo("File") == 0) { Log.info("NextCard CSVUploadFileCard"); DownloadFileCard downloadFileCard = new DownloadFileCard( exportSession); getWizardWindow().addCard(downloadFileCard); getWizardWindow().nextCard(); } else { - if (sourceId.compareTo("Workspace") == 0) { + if (destinationId.compareTo("Workspace") == 0) { Log.info("NextCard CSVWorkspaceSelectionCard"); - /*CSVWorkSpaceSelectionCard csvWorkspaceSelectionCard = new CSVWorkSpaceSelectionCard( - importSession); + CSVWorkSpaceSelectionCard csvWorkspaceSelectionCard = new CSVWorkSpaceSelectionCard( + exportSession); getWizardWindow().addCard( - csvWorkspaceSelectionCard);*/ + csvWorkspaceSelectionCard); getWizardWindow().nextCard(); } else { - Log.debug("No source selected and no card loaded"); + Log.debug("No destination selected and no card loaded"); } } }