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>
|
<version>3.0.1</version>
|
||||||
</dependency>
|
</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 -->
|
<!-- tabular-data-gwt-service -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>tabular-data-gwt-service</artifactId>
|
<artifactId>tabular-data-gwt-service</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- tabular-data-wizard-widget -->
|
<!-- tabular-data-wizard-widget -->
|
||||||
|
|
|
@ -43,31 +43,31 @@ public class DestinationSelectionCard extends WizardCard {
|
||||||
destinationSelectionPanel.setStylePrimaryName(res.wizardCSS()
|
destinationSelectionPanel.setStylePrimaryName(res.wizardCSS()
|
||||||
.getImportSelectionSources());
|
.getImportSelectionSources());
|
||||||
|
|
||||||
Radio radioFileSource = new Radio();
|
Radio radioFileDestination = new Radio();
|
||||||
radioFileSource.setBoxLabel("<p style='display:inline-table;'><b>"
|
radioFileDestination.setBoxLabel("<p style='display:inline-table;'><b>"
|
||||||
+ fileDestination.getName() + "</b><br>"
|
+ fileDestination.getName() + "</b><br>"
|
||||||
+ fileDestination.getDescription() + "</p>");
|
+ fileDestination.getDescription() + "</p>");
|
||||||
radioFileSource.setName(fileDestination.getName());
|
radioFileDestination.setName(fileDestination.getName());
|
||||||
radioFileSource.setStylePrimaryName(res.wizardCSS()
|
radioFileDestination.setStylePrimaryName(res.wizardCSS()
|
||||||
.getImportSelectionSource());
|
.getImportSelectionSource());
|
||||||
radioFileSource.setValue(true);
|
radioFileDestination.setValue(true);
|
||||||
|
|
||||||
Radio radioWorkspaceSource = new Radio();
|
Radio radioWorkspaceDestination = new Radio();
|
||||||
radioWorkspaceSource.setBoxLabel("<p style='display:inline-table;'><b>"
|
radioWorkspaceDestination.setBoxLabel("<p style='display:inline-table;'><b>"
|
||||||
+ workspaceDestination.getName() + "</b><br>"
|
+ workspaceDestination.getName() + "</b><br>"
|
||||||
+ workspaceDestination.getDescription() + "</p>");
|
+ workspaceDestination.getDescription() + "</p>");
|
||||||
radioWorkspaceSource.setName(workspaceDestination.getName());
|
radioWorkspaceDestination.setName(workspaceDestination.getName());
|
||||||
radioWorkspaceSource.setStylePrimaryName(res.wizardCSS()
|
radioWorkspaceDestination.setStylePrimaryName(res.wizardCSS()
|
||||||
.getImportSelectionSource());
|
.getImportSelectionSource());
|
||||||
// radioWorkspaceSource.disable();
|
// radioWorkspaceSource.disable();
|
||||||
|
|
||||||
destinationSelectionPanel.add(radioFileSource);
|
destinationSelectionPanel.add(radioFileDestination);
|
||||||
destinationSelectionPanel.add(radioWorkspaceSource);
|
destinationSelectionPanel.add(radioWorkspaceDestination);
|
||||||
|
|
||||||
// we can set name on radios or use toggle group
|
// we can set name on radios or use toggle group
|
||||||
ToggleGroup toggle = new ToggleGroup();
|
ToggleGroup toggle = new ToggleGroup();
|
||||||
toggle.add(radioWorkspaceSource);
|
toggle.add(radioWorkspaceDestination);
|
||||||
toggle.add(radioFileSource);
|
toggle.add(radioFileDestination);
|
||||||
|
|
||||||
toggle.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
|
toggle.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
|
||||||
|
|
||||||
|
@ -106,26 +106,26 @@ public class DestinationSelectionCard extends WizardCard {
|
||||||
Command sayNextCard = new Command() {
|
Command sayNextCard = new Command() {
|
||||||
public void execute() {
|
public void execute() {
|
||||||
try {
|
try {
|
||||||
String sourceId = exportSession.getDestination().getId();
|
String destinationId = exportSession.getDestination().getId();
|
||||||
if (sourceId == null || sourceId.isEmpty()) {
|
if (destinationId == null || destinationId.isEmpty()) {
|
||||||
Log.error("CSV Import Source Id: " + sourceId);
|
Log.error("CSV Export Source Id: " + destinationId);
|
||||||
} else {
|
} else {
|
||||||
if (sourceId.compareTo("File") == 0) {
|
if (destinationId.compareTo("File") == 0) {
|
||||||
Log.info("NextCard CSVUploadFileCard");
|
Log.info("NextCard CSVUploadFileCard");
|
||||||
DownloadFileCard downloadFileCard = new DownloadFileCard(
|
DownloadFileCard downloadFileCard = new DownloadFileCard(
|
||||||
exportSession);
|
exportSession);
|
||||||
getWizardWindow().addCard(downloadFileCard);
|
getWizardWindow().addCard(downloadFileCard);
|
||||||
getWizardWindow().nextCard();
|
getWizardWindow().nextCard();
|
||||||
} else {
|
} else {
|
||||||
if (sourceId.compareTo("Workspace") == 0) {
|
if (destinationId.compareTo("Workspace") == 0) {
|
||||||
Log.info("NextCard CSVWorkspaceSelectionCard");
|
Log.info("NextCard CSVWorkspaceSelectionCard");
|
||||||
/*CSVWorkSpaceSelectionCard csvWorkspaceSelectionCard = new CSVWorkSpaceSelectionCard(
|
CSVWorkSpaceSelectionCard csvWorkspaceSelectionCard = new CSVWorkSpaceSelectionCard(
|
||||||
importSession);
|
exportSession);
|
||||||
getWizardWindow().addCard(
|
getWizardWindow().addCard(
|
||||||
csvWorkspaceSelectionCard);*/
|
csvWorkspaceSelectionCard);
|
||||||
getWizardWindow().nextCard();
|
getWizardWindow().nextCard();
|
||||||
} else {
|
} else {
|
||||||
Log.debug("No source selected and no card loaded");
|
Log.debug("No destination selected and no card loaded");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue