Minor Updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-sdmx-export-widget@92262 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
dc7266564c
commit
ce493a3b4e
|
@ -46,12 +46,9 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
protected TextField agencyName;
|
||||
protected TextField registryBaseUrl;
|
||||
protected TextField version;
|
||||
|
||||
|
||||
|
||||
protected TextButton checkButton;
|
||||
|
||||
|
||||
|
||||
public SDMXTableDetailCard(final SDMXExportSession exportSession) {
|
||||
super("SDMX Table Detail", "");
|
||||
|
||||
|
@ -72,7 +69,7 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
fieldSet.setHeadingText("Information");
|
||||
fieldSet.setCollapsible(false);
|
||||
form.add(fieldSet);
|
||||
|
||||
|
||||
fieldSet.add(p);
|
||||
|
||||
id = new TextField();
|
||||
|
@ -81,7 +78,6 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
id.setValue(exportSession.getTabResource().getName());
|
||||
p.add(new FieldLabel(id, "Id"), new VerticalLayoutData(1, -1));
|
||||
|
||||
|
||||
agencyName = new TextField();
|
||||
agencyName.setVisible(true);
|
||||
agencyName.setEmptyText("Enter Agency...");
|
||||
|
@ -92,34 +88,33 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
registryBaseUrl = new TextField();
|
||||
registryBaseUrl.setVisible(false);
|
||||
registryBaseUrl.setEmptyText("Enter Registry URL...");
|
||||
String urlRegistry=((SDMXRegistrySource)exportSession.getSource()).getUrl();
|
||||
if(urlRegistry==null||urlRegistry.isEmpty()){
|
||||
String urlRegistry = ((SDMXRegistrySource) exportSession.getSource())
|
||||
.getUrl();
|
||||
if (urlRegistry == null || urlRegistry.isEmpty()) {
|
||||
registryBaseUrl.setValue(null);
|
||||
} else {
|
||||
registryBaseUrl.setValue(urlRegistry);
|
||||
}
|
||||
FieldLabel registryBaseUrlLabel = new FieldLabel(registryBaseUrl, "Registry URL");
|
||||
FieldLabel registryBaseUrlLabel = new FieldLabel(registryBaseUrl,
|
||||
"Registry URL");
|
||||
registryBaseUrlLabel.setVisible(false);
|
||||
p.add(registryBaseUrlLabel, new VerticalLayoutData(1, -1));
|
||||
|
||||
|
||||
version = new TextField();
|
||||
version.setAllowBlank(false);
|
||||
version.setEmptyText("Enter Version...");
|
||||
version.setValue("");
|
||||
p.add(new FieldLabel(version, "Version"), new VerticalLayoutData(1, -1));
|
||||
|
||||
|
||||
tableDetailPanel.add(form);
|
||||
setContent(tableDetailPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
Command sayNextCard = new Command() {
|
||||
|
||||
|
||||
public void execute() {
|
||||
checkData();
|
||||
}
|
||||
|
@ -158,8 +153,7 @@ 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.isValid() || agencyName.getValue() == null
|
||||
|| agencyName.getValue().isEmpty() || !agencyName.isValid()) {
|
||||
|
@ -168,11 +162,17 @@ public class SDMXTableDetailCard extends WizardCard {
|
|||
d.addHideHandler(hideHandler);
|
||||
d.show();
|
||||
} else {
|
||||
id.setReadOnly(true);
|
||||
registryBaseUrl.setReadOnly(true);
|
||||
version.setReadOnly(true);
|
||||
agencyName.setReadOnly(true);
|
||||
goNext();
|
||||
if (!version.getValue().matches("[0-9]+\\.[0-9]+")) {
|
||||
d = new AlertMessageBox("Attention!", "Version must match the regular expression [0-9]+\\.[0-9]+");
|
||||
d.addHideHandler(hideHandler);
|
||||
d.show();
|
||||
} else {
|
||||
id.setReadOnly(true);
|
||||
registryBaseUrl.setReadOnly(true);
|
||||
version.setReadOnly(true);
|
||||
agencyName.setReadOnly(true);
|
||||
goNext();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue