Minor fixes
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@130326 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2ec604e15e
commit
08a2d1b8cd
|
@ -153,6 +153,8 @@ public class CreateDatasetForm extends Composite{
|
||||||
@UiField FocusPanel focusPanelResources;
|
@UiField FocusPanel focusPanelResources;
|
||||||
@UiField Popover popoverResources;
|
@UiField Popover popoverResources;
|
||||||
|
|
||||||
|
protected static final String ERROR_PRODUCT_CREATION = "There was an error while trying to publish your product, sorry.. Retry later";
|
||||||
|
|
||||||
// tab panel
|
// tab panel
|
||||||
private TabPanel tabPanel;
|
private TabPanel tabPanel;
|
||||||
|
|
||||||
|
@ -756,17 +758,14 @@ public class CreateDatasetForm extends Composite{
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
alertOnCreate(ERROR_PRODUCT_CREATION, AlertType.ERROR);
|
||||||
alertOnCreate("Unable to create this product, maybe it already exists?", AlertType.ERROR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
alertOnCreate(ERROR_PRODUCT_CREATION, AlertType.ERROR);
|
||||||
alertOnCreate("Unable to create this product, maybe it already exists?", AlertType.ERROR);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,10 +237,10 @@ public class MetaDataFieldSkeleton extends Composite{
|
||||||
if(holder.getClass().equals(ListBox.class)){
|
if(holder.getClass().equals(ListBox.class)){
|
||||||
value = ((ListBox)holder).getSelectedItemText();
|
value = ((ListBox)holder).getSelectedItemText();
|
||||||
|
|
||||||
// if it was not mandatory but there was no choice, returning null
|
// if it was not mandatory but there was no choice, returning empty string
|
||||||
if(!field.getMandatory())
|
if(!field.getMandatory())
|
||||||
if(value.equals("Select " + field.getFieldName()))
|
if(value.equals("Select " + field.getFieldName()))
|
||||||
return null;
|
return "";
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(holder.getClass().equals(TextBox.class))
|
else if(holder.getClass().equals(TextBox.class))
|
||||||
|
|
Loading…
Reference in New Issue