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
This commit is contained in:
Costantino Perciante 2016-06-21 16:38:38 +00:00
parent 60e0d25507
commit 86deeb8ec7
3 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/gwt-user.jar">

View File

@ -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();

View File

@ -87,6 +87,15 @@
<b:TextBox alternateSize="LARGE"
placeholder="Enter one or more tag for the dataset" b:id="tags"
ui:field="tagsEnterTextBox" />
<span style="float:right; width:256px; color: #aaaaaa;">
<b:Icon type="INFO_SIGN" size="TWO_TIMES" />
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.
</span>
</b:Controls>
</b:ControlGroup>