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
This commit is contained in:
parent
97568e7dc4
commit
6682c68bef
23
pom.xml
23
pom.xml
|
@ -104,13 +104,32 @@
|
|||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- WSLT dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>workspace-light-tree</artifactId>
|
||||
<!-- <version>[2.13.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version> -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>home-library</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>gcube-widgets</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- tabular-data-gwt-service -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-gwt-service</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- tabular-data-wizard-widget -->
|
||||
|
|
|
@ -43,31 +43,31 @@ public class DestinationSelectionCard extends WizardCard {
|
|||
destinationSelectionPanel.setStylePrimaryName(res.wizardCSS()
|
||||
.getImportSelectionSources());
|
||||
|
||||
Radio radioFileSource = new Radio();
|
||||
radioFileSource.setBoxLabel("<p style='display:inline-table;'><b>"
|
||||
Radio radioFileDestination = new Radio();
|
||||
radioFileDestination.setBoxLabel("<p style='display:inline-table;'><b>"
|
||||
+ fileDestination.getName() + "</b><br>"
|
||||
+ fileDestination.getDescription() + "</p>");
|
||||
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("<p style='display:inline-table;'><b>"
|
||||
Radio radioWorkspaceDestination = new Radio();
|
||||
radioWorkspaceDestination.setBoxLabel("<p style='display:inline-table;'><b>"
|
||||
+ workspaceDestination.getName() + "</b><br>"
|
||||
+ workspaceDestination.getDescription() + "</p>");
|
||||
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<HasValue<Boolean>>() {
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue