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
This commit is contained in:
parent
71265d74ce
commit
8d67a3315d
|
@ -1,5 +1,5 @@
|
||||||
<ReleaseNotes>
|
<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>
|
<Change>First Release</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
</ReleaseNotes>
|
</ReleaseNotes>
|
|
@ -60,7 +60,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
|
||||||
// display:block;vertical-align:text-top;
|
// display:block;vertical-align:text-top;
|
||||||
description.setHTML(0, 0,
|
description.setHTML(0, 0,
|
||||||
"<span style=\"font-weight:bold;\";>Destination: </span>");
|
"<span style=\"font-weight:bold;\";>Destination: </span>");
|
||||||
description.setText(0, 1, exportSession.getSource().getName());
|
description.setText(0, 1, "EXCEL");
|
||||||
|
|
||||||
description.setHTML(1, 0,
|
description.setHTML(1, 0,
|
||||||
"<span style=\"font-weight:bold;\";>Id: </span>");
|
"<span style=\"font-weight:bold;\";>Id: </span>");
|
||||||
|
@ -93,7 +93,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
|
||||||
|
|
||||||
// columnToImportMask
|
// columnToImportMask
|
||||||
|
|
||||||
public void exportSDMX() {
|
public void exportExcel() {
|
||||||
TDGWTServiceAsync.INSTANCE.startExcelExport(exportSession,
|
TDGWTServiceAsync.INSTANCE.startExcelExport(exportSession,
|
||||||
new AsyncCallback<String>() {
|
new AsyncCallback<String>() {
|
||||||
|
|
||||||
|
@ -115,8 +115,8 @@ public class ExcelOperationInProgressCard extends WizardCard implements
|
||||||
caught.getLocalizedMessage(), "",
|
caught.getLocalizedMessage(), "",
|
||||||
caught);
|
caught);
|
||||||
} else {
|
} else {
|
||||||
showErrorAndHide("Error in exportSDMX",
|
showErrorAndHide("Error in exportEXCEL",
|
||||||
"An error occured in exportSDMX.",
|
"An error occured in exportEXCEL.",
|
||||||
caught.getLocalizedMessage(), caught);
|
caught.getLocalizedMessage(), caught);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
|
||||||
setBackButtonVisible(false);
|
setBackButtonVisible(false);
|
||||||
getWizardWindow().setEnableNextButton(false);
|
getWizardWindow().setEnableNextButton(false);
|
||||||
getWizardWindow().setNextButtonToFinish();
|
getWizardWindow().setNextButtonToFinish();
|
||||||
exportSDMX();
|
exportExcel();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -183,7 +183,7 @@ public class ExcelOperationInProgressCard extends WizardCard implements
|
||||||
new SessionExpiredEvent(
|
new SessionExpiredEvent(
|
||||||
SessionExpiredType.EXPIREDONSERVER));
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
} else {
|
} else {
|
||||||
showErrorAndHide("Error in SDMX Export", reason, details, caught);
|
showErrorAndHide("Error in EXCEL Export", reason, details, caught);
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class ExcelTableDetailCard extends WizardCard {
|
||||||
private ExcelExportSession exportSession;
|
private ExcelExportSession exportSession;
|
||||||
private ExcelTableDetailCard thisCard;
|
private ExcelTableDetailCard thisCard;
|
||||||
|
|
||||||
private VerticalLayoutContainer p = new VerticalLayoutContainer();
|
private VerticalLayoutContainer p;
|
||||||
private VerticalPanel tableDetailPanel;
|
private VerticalPanel tableDetailPanel;
|
||||||
|
|
||||||
private TextField id;
|
private TextField id;
|
||||||
|
@ -64,6 +64,7 @@ public class ExcelTableDetailCard extends WizardCard {
|
||||||
fieldSet.setCollapsible(false);
|
fieldSet.setCollapsible(false);
|
||||||
form.add(fieldSet);
|
form.add(fieldSet);
|
||||||
|
|
||||||
|
p = new VerticalLayoutContainer();
|
||||||
switch (exportSession.getExportType()) {
|
switch (exportSession.getExportType()) {
|
||||||
case DATASET:
|
case DATASET:
|
||||||
datasetViewConfig();
|
datasetViewConfig();
|
||||||
|
@ -91,6 +92,7 @@ public class ExcelTableDetailCard extends WizardCard {
|
||||||
|
|
||||||
agencyId = new TextField();
|
agencyId = new TextField();
|
||||||
agencyId.setVisible(true);
|
agencyId.setVisible(true);
|
||||||
|
agencyId.setAllowBlank(false);
|
||||||
agencyId.setEmptyText("Enter Agency Id...");
|
agencyId.setEmptyText("Enter Agency Id...");
|
||||||
if (exportSession.getAgencyId() == null || exportSession.getAgencyId().isEmpty()) {
|
if (exportSession.getAgencyId() == null || exportSession.getAgencyId().isEmpty()) {
|
||||||
agencyId.setValue(Constants.EXCEL_DATASET_EXPORT_DEFAULT_AGENCY_ID);
|
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");
|
FieldLabel agencyNameLabel = new FieldLabel(agencyId, "Agency Id");
|
||||||
p.add(agencyNameLabel, new VerticalLayoutData(1, -1));
|
p.add(agencyNameLabel, new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
|
|
||||||
version = new TextField();
|
version = new TextField();
|
||||||
version.setAllowBlank(false);
|
version.setAllowBlank(false);
|
||||||
version.setEmptyText("Enter Version...");
|
version.setEmptyText("Enter Version...");
|
||||||
|
@ -113,7 +114,6 @@ public class ExcelTableDetailCard extends WizardCard {
|
||||||
measureColumn.setReadOnly(true);
|
measureColumn.setReadOnly(true);
|
||||||
p.add(new FieldLabel(measureColumn, "Measure Column"), new VerticalLayoutData(1, -1));
|
p.add(new FieldLabel(measureColumn, "Measure Column"), new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -121,7 +121,11 @@ public class ExcelTableDetailCard extends WizardCard {
|
||||||
Command sayNextCard = new Command() {
|
Command sayNextCard = new Command() {
|
||||||
|
|
||||||
public void execute() {
|
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);
|
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
|
||||||
|
|
||||||
|
setBackButtonVisible(true);
|
||||||
|
setEnableBackButton(true);
|
||||||
|
|
||||||
getWizardWindow().setEnableNextButton(true);
|
getWizardWindow().setEnableNextButton(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -182,6 +190,11 @@ public class ExcelTableDetailCard extends WizardCard {
|
||||||
|
|
||||||
protected void goNext() {
|
protected void goNext() {
|
||||||
try {
|
try {
|
||||||
|
Log.info("Data:");
|
||||||
|
Log.info("Id: "+id.getCurrentValue());
|
||||||
|
Log.info("AgencyId: "+agencyId.getCurrentValue());
|
||||||
|
Log.info("Version: "+version.getCurrentValue());
|
||||||
|
|
||||||
exportSession.setId(id.getCurrentValue());
|
exportSession.setId(id.getCurrentValue());
|
||||||
exportSession.setAgencyId(agencyId.getCurrentValue());
|
exportSession.setAgencyId(agencyId.getCurrentValue());
|
||||||
exportSession.setVersion(version.getCurrentValue());
|
exportSession.setVersion(version.getCurrentValue());
|
||||||
|
|
|
@ -70,6 +70,7 @@ public class MeasureColumnSelectionCard extends WizardCard {
|
||||||
});
|
});
|
||||||
|
|
||||||
setContent(measureColumnSelectionPanel);
|
setContent(measureColumnSelectionPanel);
|
||||||
|
forceLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue