From 7ae60915a58d9be969da8a4cc66459eee473068c Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Mon, 8 May 2006 09:42:34 +0000 Subject: [PATCH] . Minor fix to search services in JavaScript API . Some javadoc improvements git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2785 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/repo/jscript/Node.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/source/java/org/alfresco/repo/jscript/Node.java b/source/java/org/alfresco/repo/jscript/Node.java index de3c1d38b4..8df8247728 100644 --- a/source/java/org/alfresco/repo/jscript/Node.java +++ b/source/java/org/alfresco/repo/jscript/Node.java @@ -288,7 +288,7 @@ public final class Node implements Serializable /** * @return Returns the Nodes at the specified XPath walking the children of this Node. - * So a valid call might be mynode.childrenByXPath("/*[@cm:name='Testing']/*"); + * So a valid call might be mynode.childrenByXPath("*[@cm:name='Testing']/*"); */ public Node[] childrenByXPath(String xpath) { @@ -1134,17 +1134,8 @@ public final class Node implements Serializable if (logger.isDebugEnabled()) logger.debug("Executing xpath: " + xpath); - NodeRef contextRef; - if (getParent() != null) - { - contextRef = getParent().getNodeRef(); - } - else - { - contextRef = this.nodeService.getRootNode(nodeRef.getStoreRef()); - } List nodes = this.services.getSearchService().selectNodes( - contextRef, + this.nodeRef, xpath, null, this.services.getNamespaceService(),