Remove stub now that depth is implemented
authorCharles du Jeu <charles.dujeu@gmail.com>
Wed, 28 Apr 2010 17:21:48 +0000 (17:21 +0000)
committerCharles du Jeu <charles.dujeu@gmail.com>
Wed, 28 Apr 2010 17:21:48 +0000 (17:21 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@3517 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

server/org.argeo.slc.ria/src/argeo-ria-lib/jcr/class/org/argeo/jcr/ria/provider/XmlNodeProvider.js

index ee98349734931297f724c77c8b08a175aa5860c0..41a830c8323d3801cc8b123add6b17505bb032cb 100644 (file)
@@ -34,15 +34,6 @@ qx.Class.define("org.argeo.jcr.ria.provider.XmlNodeProvider", {
                                // Parse document and load\r
                                node.setName(this._xmlDoc.documentElement.nodeName);\r
                                var properties = this.getSettings();                                    \r
-                               // STUB : prune sub children, load only level 1\r
-                               var children = this._xmlDoc.documentElement.childNodes;\r
-                               for(var i=0;i<children.length;i++){\r
-                                       var subchildren = children[i].childNodes;\r
-                                       for(var j=0;j<subchildren.length;j++){\r
-                                               children[i].removeChild(subchildren[j]);\r
-                                       }\r
-                               }\r
-                               // END STUB\r
                                node.fromDomElement(this._xmlDoc.documentElement);\r
                                node.setLoadState("loaded");\r
                                if(properties.dynamic){\r
@@ -64,6 +55,7 @@ qx.Class.define("org.argeo.jcr.ria.provider.XmlNodeProvider", {
                                var request = new org.argeo.ria.remote.Request(properties.xmlSrc, 'GET', 'application/xml');\r
                                if(properties.dynamic && properties.pathParameter){\r
                                        request.setParameter(properties.pathParameter, (node.getPath()|| "/"));\r
+                                       request.setParameter("depth", 1);\r
                                }\r
                                request.addListener("completed", function(response){\r
                                        this._xmlDoc = response.getContent();\r