ref #9944: TabMan - Enable Excel export operation for DataSet only

https://support.d4science.org/issues/#9944

Added operation



git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-excel-export-widget@162128 82a268e6-3cf1-43bd-a215-b396298e98cf
master
Giancarlo Panichi 6 years ago
parent 71265d74ce
commit 8d67a3315d

@ -1,5 +1,5 @@
<ReleaseNotes>
<Changeset component="${groupId}.${artifactId}.1-0-0" date="2018-01-12">
<Changeset component="org.gcube.portlets-user.tabular-data-excel-export-widget.1-0-0" date="2018-01-12">
<Change>First Release</Change>
</Changeset>
</ReleaseNotes>

@ -60,7 +60,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
// display:block;vertical-align:text-top;
description.setHTML(0, 0,
"<span style=\"font-weight:bold;\";>Destination: </span>");
description.setText(0, 1, exportSession.getSource().getName());
description.setText(0, 1, "EXCEL");
description.setHTML(1, 0,
"<span style=\"font-weight:bold;\";>Id: </span>");
@ -93,7 +93,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
// columnToImportMask
public void exportSDMX() {
public void exportExcel() {
TDGWTServiceAsync.INSTANCE.startExcelExport(exportSession,
new AsyncCallback<String>() {
@ -115,8 +115,8 @@ public class ExcelOperationInProgressCard extends WizardCard implements
caught.getLocalizedMessage(), "",
caught);
} else {
showErrorAndHide("Error in exportSDMX",
"An error occured in exportSDMX.",
showErrorAndHide("Error in exportEXCEL",
"An error occured in exportEXCEL.",
caught.getLocalizedMessage(), caught);
}
}
@ -130,7 +130,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
setBackButtonVisible(false);
getWizardWindow().setEnableNextButton(false);
getWizardWindow().setNextButtonToFinish();
exportSDMX();
exportExcel();
}
//
@ -183,7 +183,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
showErrorAndHide("Error in SDMX Export", reason, details, caught);
showErrorAndHide("Error in EXCEL Export", reason, details, caught);
}
forceLayout();
}

@ -35,7 +35,7 @@ public class ExcelTableDetailCard extends WizardCard {
private ExcelExportSession exportSession;
private ExcelTableDetailCard thisCard;
private VerticalLayoutContainer p = new VerticalLayoutContainer();
private VerticalLayoutContainer p;
private VerticalPanel tableDetailPanel;
private TextField id;
@ -63,7 +63,8 @@ public class ExcelTableDetailCard extends WizardCard {
fieldSet.setHeadingText("Information");
fieldSet.setCollapsible(false);
form.add(fieldSet);
p = new VerticalLayoutContainer();
switch (exportSession.getExportType()) {
case DATASET:
datasetViewConfig();
@ -91,6 +92,7 @@ public class ExcelTableDetailCard extends WizardCard {
agencyId = new TextField();
agencyId.setVisible(true);
agencyId.setAllowBlank(false);
agencyId.setEmptyText("Enter Agency Id...");
if (exportSession.getAgencyId() == null || exportSession.getAgencyId().isEmpty()) {
agencyId.setValue(Constants.EXCEL_DATASET_EXPORT_DEFAULT_AGENCY_ID);
@ -101,7 +103,6 @@ public class ExcelTableDetailCard extends WizardCard {
FieldLabel agencyNameLabel = new FieldLabel(agencyId, "Agency Id");
p.add(agencyNameLabel, new VerticalLayoutData(1, -1));
version = new TextField();
version.setAllowBlank(false);
version.setEmptyText("Enter Version...");
@ -113,7 +114,6 @@ public class ExcelTableDetailCard extends WizardCard {
measureColumn.setReadOnly(true);
p.add(new FieldLabel(measureColumn, "Measure Column"), new VerticalLayoutData(1, -1));
}
@Override
@ -121,7 +121,11 @@ public class ExcelTableDetailCard extends WizardCard {
Command sayNextCard = new Command() {
public void execute() {
checkData();
try {
checkData();
} catch (Exception e) {
Log.error("Error in checkData :" + e.getLocalizedMessage(),e);
}
}
};
@ -141,6 +145,10 @@ public class ExcelTableDetailCard extends WizardCard {
};
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
setBackButtonVisible(true);
setEnableBackButton(true);
getWizardWindow().setEnableNextButton(true);
}
@ -182,10 +190,15 @@ public class ExcelTableDetailCard extends WizardCard {
protected void goNext() {
try {
Log.info("Data:");
Log.info("Id: "+id.getCurrentValue());
Log.info("AgencyId: "+agencyId.getCurrentValue());
Log.info("Version: "+version.getCurrentValue());
exportSession.setId(id.getCurrentValue());
exportSession.setAgencyId(agencyId.getCurrentValue());
exportSession.setVersion(version.getCurrentValue());
ExcelOperationInProgressCard excelOperationInProgressCard = new ExcelOperationInProgressCard(exportSession);
getWizardWindow().addCard(excelOperationInProgressCard);
Log.info("NextCard ExcelOperationInProgressCard");

@ -47,7 +47,7 @@ public class MeasureColumnSelectionCard extends WizardCard {
box.show();
retrieveTabularDataInfo(box);
}
@ -70,6 +70,7 @@ public class MeasureColumnSelectionCard extends WizardCard {
});
setContent(measureColumnSelectionPanel);
forceLayout();
}

Loading…
Cancel
Save