From 86deeb8ec7a838c43f6ca5673dd638f17fd76c45 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Tue, 21 Jun 2016 16:38:38 +0000 Subject: [PATCH] Added check for tags and information for them git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@129239 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 1 + .../client/ui/CreateDatasetForm.java | 3 +++ .../client/ui/CreateDatasetForm.ui.xml | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/.classpath b/.classpath index 7602c34..b43235b 100644 --- a/.classpath +++ b/.classpath @@ -20,6 +20,7 @@ + diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java index fb1655f..815025e 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java @@ -878,6 +878,9 @@ public class CreateDatasetForm extends Composite{ // ckan accepts only alphanumeric values if(!itemBox.getValue().matches("^[a-zA-Z0-9]*$")) return; + + if(itemBox.getValue().length() <= 1) + return; final String value = itemBox.getValue(); final ListItem displayItem = new ListItem(); diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml index fc71537..c5560d5 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml @@ -87,6 +87,15 @@ + + + Tags are meaningful information that can be associated to the + dataset and by means of them + it can be retrieved. A tag cannot + contain white spaces and can contain only alphanumeric + characters. + It must be at least of two characters. +