-
7 Dec 2011 12:41 PM #1
Unanswered: TreeStore w/ XML reader Example
Unanswered: TreeStore w/ XML reader Example
Is there an example of loading hierarchical data into a tree store using an XML reader? The reason why I ask is because the method Ext.data.reader.Xml::getRoot() is failing when the call to Ext.DomQuery.isXml() is called. The error states that the method Ext.DomQuery.isXml() does not exist. Upon learning that I overrided the method and removed the conditional making the conditional a mere else but now receive an error stating the method querySelectorAll does not exist on passed object (root object which is an object literal - makes sense). So it seems to me looking at the comments that someone anticipated the possibility of root node for a tree store not being a dom node but has not fully implemented it yet in regards to Ext.DomQuery.selectNode() is that the case? I'll look at it a little further though.
-
7 Dec 2011 1:05 PM #2
Looks to me like the root node edge case has yet to be implemented though there are clearly comments regarding it. Looking at the code the comment seems incorrect in that the edge case is not being handled, rtaher than it has been handled.
Ext.data.reader.Xml::getRoot()
Code:// This fix ensures we have XML data // Related to TreeStore calling getRoot with the root node, which isn't XML // Probably should be resolved in TreeStore at some point return Ext.DomQuery.selectNode(root, data); // ?fix I don't think so...
-
8 Dec 2011 4:03 PM #3
If you provide a test case with some sample data we can definitely look into it.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
8 Dec 2011 4:20 PM #4
So no example exists?
I can create a test case but it is pretty clear looking at the code that querySelectorAll is called using the root level node object which in many cases is merely an object literal.
-
8 Dec 2011 4:24 PM #5
I don't think I've ever seen an example of Sencha Touch app using XML.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
9 Dec 2011 9:26 AM #6
This can be closed considering a related post in the bugs forum has been made including a test case and some debugging details of my own.


Reply With Quote