7 Dec 2011 12:41 PM #1
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.
// 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
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
9 Dec 2011 9:26 AM #6