mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- Fixed bug raised on forum that category values can be applied more than once.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2156 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -131,6 +131,8 @@ public class LinkCategoryActionExecuter extends ActionExecuterAbstractBase
|
|||||||
// Append the category value to the existing values
|
// Append the category value to the existing values
|
||||||
Serializable value = this.nodeService.getProperty(actionedUponNodeRef, categoryProperty);
|
Serializable value = this.nodeService.getProperty(actionedUponNodeRef, categoryProperty);
|
||||||
Collection<NodeRef> categories = DefaultTypeConverter.INSTANCE.getCollection(NodeRef.class, value);
|
Collection<NodeRef> categories = DefaultTypeConverter.INSTANCE.getCollection(NodeRef.class, value);
|
||||||
|
if (categories.contains(categoryValue) == false)
|
||||||
|
{
|
||||||
categories.add(categoryValue);
|
categories.add(categoryValue);
|
||||||
this.nodeService.setProperty(actionedUponNodeRef, categoryProperty, (Serializable)categories);
|
this.nodeService.setProperty(actionedUponNodeRef, categoryProperty, (Serializable)categories);
|
||||||
}
|
}
|
||||||
@@ -139,3 +141,4 @@ public class LinkCategoryActionExecuter extends ActionExecuterAbstractBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user