Fixed SDMX Export now use agency id
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-sdmx-export-widget@144645 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
af2c89ad1f
commit
d38abe2959
|
@ -64,6 +64,8 @@ public class AgenciesSelectionPanel extends ContentPanel implements
|
||||||
private static final AgenciesProperties properties = GWT
|
private static final AgenciesProperties properties = GWT
|
||||||
.create(AgenciesProperties.class);
|
.create(AgenciesProperties.class);
|
||||||
|
|
||||||
|
protected static final ColumnConfig<Agencies, String> idColumn = new ColumnConfig<Agencies, String>(
|
||||||
|
properties.id(), 50, "Id");
|
||||||
protected static final ColumnConfig<Agencies, String> nameColumn = new ColumnConfig<Agencies, String>(
|
protected static final ColumnConfig<Agencies, String> nameColumn = new ColumnConfig<Agencies, String>(
|
||||||
properties.name(), 50, "Name");
|
properties.name(), 50, "Name");
|
||||||
protected static final ColumnConfig<Agencies, String> descriptionColumn = new ColumnConfig<Agencies, String>(
|
protected static final ColumnConfig<Agencies, String> descriptionColumn = new ColumnConfig<Agencies, String>(
|
||||||
|
@ -80,7 +82,7 @@ public class AgenciesSelectionPanel extends ContentPanel implements
|
||||||
setHeaderVisible(false);
|
setHeaderVisible(false);
|
||||||
//new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
//new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
||||||
buildPanel(properties.key(), Arrays.<ColumnConfig<Agencies, ?>> asList(
|
buildPanel(properties.key(), Arrays.<ColumnConfig<Agencies, ?>> asList(
|
||||||
nameColumn, descriptionColumn), nameColumn);
|
idColumn, nameColumn, descriptionColumn), idColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void buildPanel(ModelKeyProvider<Agencies> keyProvider,
|
protected void buildPanel(ModelKeyProvider<Agencies> keyProvider,
|
||||||
|
|
|
@ -74,8 +74,8 @@ public class SDMXOperationInProgressCard extends WizardCard implements
|
||||||
description.setText(1, 1, exportSession.getId());
|
description.setText(1, 1, exportSession.getId());
|
||||||
|
|
||||||
description.setHTML(2, 0,
|
description.setHTML(2, 0,
|
||||||
"<span style=\"font-weight:bold;\";>Agency: </span>");
|
"<span style=\"font-weight:bold;\";>Agency Id: </span>");
|
||||||
description.setText(2, 1, exportSession.getAgencyName());
|
description.setText(2, 1, exportSession.getAgencyId());
|
||||||
|
|
||||||
description.setHTML(3, 0,
|
description.setHTML(3, 0,
|
||||||
"<span style=\"font-weight:bold;\";>Registry: </span>");
|
"<span style=\"font-weight:bold;\";>Registry: </span>");
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class SDMXTableDetailCard extends WizardCard {
|
||||||
private VerticalPanel tableDetailPanel;
|
private VerticalPanel tableDetailPanel;
|
||||||
|
|
||||||
private TextField id;
|
private TextField id;
|
||||||
private TextField agencyName;
|
private TextField agencyId;
|
||||||
private TextField registryBaseUrl;
|
private TextField registryBaseUrl;
|
||||||
private TextField version;
|
private TextField version;
|
||||||
private TextField measureColumn;
|
private TextField measureColumn;
|
||||||
|
@ -94,17 +94,17 @@ public class SDMXTableDetailCard extends WizardCard {
|
||||||
id.setValue(Constants.SDMX_DATASET_EXPORT_DEFAULT_ID);
|
id.setValue(Constants.SDMX_DATASET_EXPORT_DEFAULT_ID);
|
||||||
p.add(new FieldLabel(id, "Id"), new VerticalLayoutData(1, -1));
|
p.add(new FieldLabel(id, "Id"), new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
agencyName = new TextField();
|
agencyId = new TextField();
|
||||||
agencyName.setVisible(true);
|
agencyId.setVisible(true);
|
||||||
agencyName.setEmptyText("Enter Agency...");
|
agencyId.setEmptyText("Enter Agency Id...");
|
||||||
if (exportSession.getAgency().getName() == null
|
if (exportSession.getAgency().getId() == null
|
||||||
|| exportSession.getAgency().getName().isEmpty()) {
|
|| exportSession.getAgency().getId().isEmpty()) {
|
||||||
agencyName.setValue(Constants.SDMX_DATASET_EXPORT_DEFAULT_AGENCY);
|
agencyId.setValue(Constants.SDMX_DATASET_EXPORT_DEFAULT_AGENCY_ID);
|
||||||
} else {
|
} else {
|
||||||
agencyName.setValue(exportSession.getAgency().getName());
|
agencyId.setValue(exportSession.getAgency().getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
FieldLabel agencyNameLabel = new FieldLabel(agencyName, "Agency");
|
FieldLabel agencyNameLabel = new FieldLabel(agencyId, "Agency Id");
|
||||||
p.add(agencyNameLabel, new VerticalLayoutData(1, -1));
|
p.add(agencyNameLabel, new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
registryBaseUrl = new TextField();
|
registryBaseUrl = new TextField();
|
||||||
|
@ -142,16 +142,16 @@ public class SDMXTableDetailCard extends WizardCard {
|
||||||
id.setValue(Constants.SDMX_CODELIST_EXPORT_DEFAULT_ID);
|
id.setValue(Constants.SDMX_CODELIST_EXPORT_DEFAULT_ID);
|
||||||
p.add(new FieldLabel(id, "Id"), new VerticalLayoutData(1, -1));
|
p.add(new FieldLabel(id, "Id"), new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
agencyName = new TextField();
|
agencyId = new TextField();
|
||||||
agencyName.setVisible(true);
|
agencyId.setVisible(true);
|
||||||
agencyName.setEmptyText("Enter Agency...");
|
agencyId.setEmptyText("Enter Agency...");
|
||||||
if (exportSession.getAgency().getName() == null
|
if (exportSession.getAgency().getId() == null
|
||||||
|| exportSession.getAgency().getName().isEmpty()) {
|
|| exportSession.getAgency().getId().isEmpty()) {
|
||||||
agencyName.setValue(Constants.SDMX_CODELIST_EXPORT_DEFAULT_AGENCY);
|
agencyId.setValue(Constants.SDMX_CODELIST_EXPORT_DEFAULT_AGENCY_ID);
|
||||||
} else {
|
} else {
|
||||||
agencyName.setValue(exportSession.getAgency().getName());
|
agencyId.setValue(exportSession.getAgency().getId());
|
||||||
}
|
}
|
||||||
FieldLabel agencyNameLabel = new FieldLabel(agencyName, "Agency");
|
FieldLabel agencyNameLabel = new FieldLabel(agencyId, "Agency Id");
|
||||||
p.add(agencyNameLabel, new VerticalLayoutData(1, -1));
|
p.add(agencyNameLabel, new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
registryBaseUrl = new TextField();
|
registryBaseUrl = new TextField();
|
||||||
|
@ -220,8 +220,8 @@ public class SDMXTableDetailCard extends WizardCard {
|
||||||
|
|
||||||
if (id.getValue() == null || id.getValue().isEmpty() || !id.isValid()
|
if (id.getValue() == null || id.getValue().isEmpty() || !id.isValid()
|
||||||
|| version.getValue() == null || version.getValue().isEmpty()
|
|| version.getValue() == null || version.getValue().isEmpty()
|
||||||
|| !version.isValid() || agencyName.getValue() == null
|
|| !version.isValid() || agencyId.getValue() == null
|
||||||
|| agencyName.getValue().isEmpty() || !agencyName.isValid()) {
|
|| agencyId.getValue().isEmpty() || !agencyId.isValid()) {
|
||||||
|
|
||||||
d = new AlertMessageBox("Attention!", "Fill in all fields");
|
d = new AlertMessageBox("Attention!", "Fill in all fields");
|
||||||
d.addHideHandler(hideHandler);
|
d.addHideHandler(hideHandler);
|
||||||
|
@ -236,7 +236,7 @@ public class SDMXTableDetailCard extends WizardCard {
|
||||||
id.setReadOnly(true);
|
id.setReadOnly(true);
|
||||||
registryBaseUrl.setReadOnly(true);
|
registryBaseUrl.setReadOnly(true);
|
||||||
version.setReadOnly(true);
|
version.setReadOnly(true);
|
||||||
agencyName.setReadOnly(true);
|
agencyId.setReadOnly(true);
|
||||||
goNext();
|
goNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ public class SDMXTableDetailCard extends WizardCard {
|
||||||
protected void goNext() {
|
protected void goNext() {
|
||||||
try {
|
try {
|
||||||
exportSession.setId(id.getCurrentValue());
|
exportSession.setId(id.getCurrentValue());
|
||||||
exportSession.setAgencyName(agencyName.getCurrentValue());
|
exportSession.setAgencyId(agencyId.getCurrentValue());
|
||||||
exportSession.setVersion(version.getCurrentValue());
|
exportSession.setVersion(version.getCurrentValue());
|
||||||
exportSession.setRegistryBaseUrl(registryBaseUrl.getCurrentValue());
|
exportSession.setRegistryBaseUrl(registryBaseUrl.getCurrentValue());
|
||||||
SDMXOperationInProgressCard sdmxOperationInProgressCard = new SDMXOperationInProgressCard(
|
SDMXOperationInProgressCard sdmxOperationInProgressCard = new SDMXOperationInProgressCard(
|
||||||
|
|
|
@ -23,9 +23,9 @@ public interface AgenciesProperties extends PropertyAccess<Agencies> {
|
||||||
|
|
||||||
@Path("id")
|
@Path("id")
|
||||||
ModelKeyProvider<Agencies> key();
|
ModelKeyProvider<Agencies> key();
|
||||||
|
|
||||||
LabelProvider<Agencies> nameLabel();
|
LabelProvider<Agencies> nameLabel();
|
||||||
|
|
||||||
|
ValueProvider<Agencies, String> id();
|
||||||
ValueProvider<Agencies, String> name();
|
ValueProvider<Agencies, String> name();
|
||||||
ValueProvider<Agencies, String> description();
|
ValueProvider<Agencies, String> description();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue