Merged 1.4 to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4392 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4399 .
   svn resolved root\projects\repository\source\java\org\alfresco\repo\jscript\Node.java


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4660 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-12-19 16:01:52 +00:00
parent 4443f42279
commit ced83b971b
4 changed files with 626 additions and 577 deletions

View File

@@ -130,12 +130,20 @@ public class LinkCategoryActionExecuter extends ActionExecuterAbstractBase
{
// Append the category value to the existing values
Serializable value = this.nodeService.getProperty(actionedUponNodeRef, categoryProperty);
Collection<NodeRef> categories = DefaultTypeConverter.INSTANCE.getCollection(NodeRef.class, value);
if (categories.contains(categoryValue) == false)
Collection<NodeRef> categories = null;
if (value == null)
{
categories.add(categoryValue);
this.nodeService.setProperty(actionedUponNodeRef, categoryProperty, (Serializable)categories);
categories = DefaultTypeConverter.INSTANCE.getCollection(NodeRef.class, categoryValue);
}
else
{
categories = DefaultTypeConverter.INSTANCE.getCollection(NodeRef.class, value);
if (categories.contains(categoryValue) == false)
{
categories.add(categoryValue);
}
}
this.nodeService.setProperty(actionedUponNodeRef, categoryProperty, (Serializable)categories);
}
}
}