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:
Costantino Perciante 2016-07-13 16:35:46 +00:00
parent 2ec604e15e
commit 08a2d1b8cd
2 changed files with 7 additions and 8 deletions

View File

@ -72,7 +72,7 @@ import com.google.gwt.user.client.ui.Widget;
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
*/
public class CreateDatasetForm extends Composite{
/**
* Create a remote service proxy to talk to the server-side ckan service.
*/
@ -152,6 +152,8 @@ public class CreateDatasetForm extends Composite{
@UiField Icon infoIconResources;
@UiField FocusPanel focusPanelResources;
@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
private TabPanel tabPanel;
@ -756,17 +758,14 @@ public class CreateDatasetForm extends Composite{
}
}else{
alertOnCreate("Unable to create this product, maybe it already exists?", AlertType.ERROR);
alertOnCreate(ERROR_PRODUCT_CREATION, AlertType.ERROR);
}
}
@Override
public void onFailure(Throwable caught) {
alertOnCreate("Unable to create this product, maybe it already exists?", AlertType.ERROR);
alertOnCreate(ERROR_PRODUCT_CREATION, AlertType.ERROR);
}
});
}

View File

@ -237,10 +237,10 @@ public class MetaDataFieldSkeleton extends Composite{
if(holder.getClass().equals(ListBox.class)){
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(value.equals("Select " + field.getFieldName()))
return null;
return "";
}
else if(holder.getClass().equals(TextBox.class))