ScriptNode addNode() updated to set the child name correctly (2nd try - picking up correct node this time)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10387 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2008-08-18 07:02:20 +00:00
parent ffda0d4f49
commit 6cf1100e1a

View File

@@ -1309,7 +1309,7 @@ public class ScriptNode implements Serializable, Scopeable
public void addNode(ScriptNode node)
{
ParameterCheck.mandatory("node", node);
ChildAssociationRef childAssocRef = this.nodeService.getPrimaryParent(this.nodeRef);
ChildAssociationRef childAssocRef = this.nodeService.getPrimaryParent(node.nodeRef);
nodeService.addChild(this.nodeRef, node.nodeRef, ContentModel.ASSOC_CONTAINS, childAssocRef.getQName());
reset();
}