PDA

View Full Version : [FIXED] ext.domquery.isxml is undefined



dsac
14 Nov 2011, 1:02 AM
Hi,

while trying to parse xml through an ajax proxy, i'm getting this error:

Uncaught TypeError: Object [object Object] has no method 'isXml'

As far as i understand, "ext.domquery.isxml" isn't even defined.

related code segment:


model: 'app.models.Category',
autoLoad: false,
proxy: {
type: 'ajax',
url: 'test.xml',
reader: {
type: 'xml',
root: 'items',
record: 'item'
}
}


any ideas?

mitchellsimoens
14 Nov 2011, 10:45 AM
What does your XML look like?

dsac
15 Nov 2011, 12:46 AM
"items" isn't exactly the first tag in my xml file, but the logical root to the records. Changing root to first tag in the xml file fixes the problem, because i'm getting around entering the else branch.



<category>
<category_info>
stuff...
</category_info>
<items>
<item>
stuff...
</item>
<item>
stuff...
</item>
</items>
</category

dsac
18 Nov 2011, 4:40 AM
looks like it's a bug!

changing:


} else if (Ext.DomQuery.isXml(data)) {
// 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);
}


to:


} else {
// 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);
}



in "sencha-touch-all-debug-w-comments.js" does the trick for me!

rdougan
21 Nov 2011, 2:26 PM
It seems isXml didn't get into Touch's version of DomQuery.