replace tree with celltree ( still work in progress)
[pithos] / src / gr / ebs / gss / client / AbstractPropertiesDialog.java
index 2f00992..b940e66 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright 2007, 2008, 2009 Electronic Business Systems Ltd.\r
+ * Copyright 2007, 2008, 2009, 2010 Electronic Business Systems Ltd.\r
  *\r
  * This file is part of GSS.\r
  *\r
@@ -30,9 +30,10 @@ import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.dom.client.KeyCodes;\r
 import com.google.gwt.user.client.DeferredCommand;\r
 import com.google.gwt.user.client.Event.NativePreviewEvent;\r
+import com.google.gwt.user.client.ui.Anchor;\r
 import com.google.gwt.user.client.ui.DialogBox;\r
 import com.google.gwt.user.client.ui.FlowPanel;\r
-import com.google.gwt.user.client.ui.HTML;\r
+import com.google.gwt.user.client.ui.Label;\r
 import com.google.gwt.user.client.ui.TabPanel;\r
 import com.google.gwt.user.client.ui.TextBox;\r
 \r
@@ -85,18 +86,21 @@ public abstract class AbstractPropertiesDialog extends DialogBox {
                                allTagsContent.clear();\r
                                TagsResource tagr = getResult();\r
                                List<String> userTags = tagr.getTags();\r
-                               HTML tag = null;\r
+                               Anchor tag = null;\r
                                for(String usrTag : userTags){\r
-                                       tag = new HTML(usrTag.toString()+"&nbsp", true);\r
+                                       tag = new Anchor(usrTag.toString(), false);\r
                                        tag.addStyleName("gss-tag");\r
                                        allTagsContent.add(tag);\r
+                                       Label separator = new Label(", ");\r
+                                       separator.addStyleName("gss-tag");\r
+                                       allTagsContent.add(separator);\r
                                        tag.addClickHandler( new ClickHandler() {\r
-                                       \r
+\r
                                                @Override\r
                                                public void onClick(ClickEvent event) {\r
                                                        String existing = tags.getText();\r
                                                        if (MULTIPLE_VALUES_TEXT.equals(existing)) existing = "";\r
-                                                       String newTag = ((HTML) event.getSource()).getText().trim();\r
+                                                       String newTag = ((Anchor) event.getSource()).getText().trim();\r
                                                        // insert the new tag only if it is not in the list\r
                                                        // already\r
                                                        if (existing.indexOf(newTag) == -1 && !existing.trim().endsWith(newTag))\r