public Object jsFunction_getNodes()

in src/main/java/org/apache/sling/scripting/javascript/wrapper/ScriptableNode.java [115:128]


    public Object jsFunction_getNodes(String namePattern) {
        try {
            NodeIterator iter = null;
            if(namePattern == null || "undefined".equals(namePattern)) {
                iter = node.getNodes();
            } else {
                iter = node.getNodes(namePattern);
            }
            return toScriptableItemMap(iter);
        } catch (RepositoryException re) {
            log.warn("Cannot get children of " + jsFunction_getPath() + " with pattern " + namePattern, re);
            return toScriptableItemMap(null);
        }
    }