Fixed alert behavior

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@111652 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-02-04 11:27:13 +00:00
parent f8963de3af
commit 28f2cefd80
1 changed files with 5 additions and 0 deletions

View File

@ -263,15 +263,18 @@ public class CreateDefColumnPanel extends FramedPanel {
+ ", locale: " + localeElement + ", default: " + valueDefault);
if (lab == null || lab.isEmpty()) {
UtilsGXT3.alert("Attention", "Add a label");
btnSave.enable();
return;
}
if (typeElement == null) {
UtilsGXT3.alert("Attention", "No type selected");
btnSave.enable();
return;
} else {
if (typeElement.getCode() == null) {
UtilsGXT3.alert("Attention", "No type selected");
btnSave.enable();
return;
} else {
currentType = typeElement.getCode();
@ -280,11 +283,13 @@ public class CreateDefColumnPanel extends FramedPanel {
if (currentType != null && currentType == ColumnTypeCode.CODENAME) {
if (localeElement == null) {
UtilsGXT3.alert("Attention", "No locale selected");
btnSave.enable();
return;
} else {
if (localeElement.getLocaleName() == null
|| localeElement.getLocaleName().isEmpty()) {
UtilsGXT3.alert("Attention", "No locale selected");
btnSave.enable();
return;
} else {
localeName = localeElement.getLocaleName();