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
|
||||
.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>(
|
||||
properties.name(), 50, "Name");
|
||||
protected static final ColumnConfig<Agencies, String> descriptionColumn = new ColumnConfig<Agencies, String>(
|
||||
|
@ -80,7 +82,7 @@ public class AgenciesSelectionPanel extends ContentPanel implements
|
|||
setHeaderVisible(false);
|
||||
//new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
||||
buildPanel(properties.key(), Arrays.<ColumnConfig<Agencies, ?>> asList(
|
||||
nameColumn, descriptionColumn), nameColumn);
|
||||
idColumn, nameColumn, descriptionColumn), idColumn);
|
||||
}
|
||||
|
||||
protected void buildPanel(ModelKeyProvider<Agencies> keyProvider,
|
||||
|
|
|
@ -74,8 +74,8 @@ public class SDMXOperationInProgressCard extends WizardCard implements
|
|||
description.setText(1, 1, exportSession.getId());
|
||||
|
||||
description.setHTML(2, 0,
|
||||
"<span style=\"font-weight:bold;\";>Agency: </span>");
|
||||
description.setText(2, 1, exportSession.getAgencyName());
|
||||
"<span style=\"font-weight:bold;\";>Agency Id: </span>");
|
||||
description.setText(2, 1, exportSession.getAgencyId());
|
||||
|
||||
description.setHTML(3, 0,
|
||||
"<span style=\"font-weight:bold;\";>Registry: </span>");
|
||||
|
|
|
@ -40,7 +40,7 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
private VerticalPanel tableDetailPanel;
|
||||
|
||||
private TextField id;
|
||||
private TextField agencyName;
|
||||
private TextField agencyId;
|
||||
private TextField registryBaseUrl;
|
||||
private TextField version;
|
||||
private TextField measureColumn;
|
||||
|
@ -94,17 +94,17 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
id.setValue(Constants.SDMX_DATASET_EXPORT_DEFAULT_ID);
|
||||
p.add(new FieldLabel(id, "Id"), new VerticalLayoutData(1, -1));
|
||||
|
||||
agencyName = new TextField();
|
||||
agencyName.setVisible(true);
|
||||
agencyName.setEmptyText("Enter Agency...");
|
||||
if (exportSession.getAgency().getName() == null
|
||||
|| exportSession.getAgency().getName().isEmpty()) {
|
||||
agencyName.setValue(Constants.SDMX_DATASET_EXPORT_DEFAULT_AGENCY);
|
||||
agencyId = new TextField();
|
||||
agencyId.setVisible(true);
|
||||
agencyId.setEmptyText("Enter Agency Id...");
|
||||
if (exportSession.getAgency().getId() == null
|
||||
|| exportSession.getAgency().getId().isEmpty()) {
|
||||
agencyId.setValue(Constants.SDMX_DATASET_EXPORT_DEFAULT_AGENCY_ID);
|
||||
} 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));
|
||||
|
||||
registryBaseUrl = new TextField();
|
||||
|
@ -142,16 +142,16 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
id.setValue(Constants.SDMX_CODELIST_EXPORT_DEFAULT_ID);
|
||||
p.add(new FieldLabel(id, "Id"), new VerticalLayoutData(1, -1));
|
||||
|
||||
agencyName = new TextField();
|
||||
agencyName.setVisible(true);
|
||||
agencyName.setEmptyText("Enter Agency...");
|
||||
if (exportSession.getAgency().getName() == null
|
||||
|| exportSession.getAgency().getName().isEmpty()) {
|
||||
agencyName.setValue(Constants.SDMX_CODELIST_EXPORT_DEFAULT_AGENCY);
|
||||
agencyId = new TextField();
|
||||
agencyId.setVisible(true);
|
||||
agencyId.setEmptyText("Enter Agency...");
|
||||
if (exportSession.getAgency().getId() == null
|
||||
|| exportSession.getAgency().getId().isEmpty()) {
|
||||
agencyId.setValue(Constants.SDMX_CODELIST_EXPORT_DEFAULT_AGENCY_ID);
|
||||
} 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));
|
||||
|
||||
registryBaseUrl = new TextField();
|
||||
|
@ -220,8 +220,8 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
|
||||
if (id.getValue() == null || id.getValue().isEmpty() || !id.isValid()
|
||||
|| version.getValue() == null || version.getValue().isEmpty()
|
||||
|| !version.isValid() || agencyName.getValue() == null
|
||||
|| agencyName.getValue().isEmpty() || !agencyName.isValid()) {
|
||||
|| !version.isValid() || agencyId.getValue() == null
|
||||
|| agencyId.getValue().isEmpty() || !agencyId.isValid()) {
|
||||
|
||||
d = new AlertMessageBox("Attention!", "Fill in all fields");
|
||||
d.addHideHandler(hideHandler);
|
||||
|
@ -236,7 +236,7 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
id.setReadOnly(true);
|
||||
registryBaseUrl.setReadOnly(true);
|
||||
version.setReadOnly(true);
|
||||
agencyName.setReadOnly(true);
|
||||
agencyId.setReadOnly(true);
|
||||
goNext();
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
protected void goNext() {
|
||||
try {
|
||||
exportSession.setId(id.getCurrentValue());
|
||||
exportSession.setAgencyName(agencyName.getCurrentValue());
|
||||
exportSession.setAgencyId(agencyId.getCurrentValue());
|
||||
exportSession.setVersion(version.getCurrentValue());
|
||||
exportSession.setRegistryBaseUrl(registryBaseUrl.getCurrentValue());
|
||||
SDMXOperationInProgressCard sdmxOperationInProgressCard = new SDMXOperationInProgressCard(
|
||||
|
|
|
@ -23,9 +23,9 @@ public interface AgenciesProperties extends PropertyAccess<Agencies> {
|
|||
|
||||
@Path("id")
|
||||
ModelKeyProvider<Agencies> key();
|
||||
|
||||
LabelProvider<Agencies> nameLabel();
|
||||
|
||||
ValueProvider<Agencies, String> id();
|
||||
ValueProvider<Agencies, String> name();
|
||||
ValueProvider<Agencies, String> description();
|
||||
|
||||
|
|
Loading…
Reference in New Issue