// in app.html
<link rel="stylesheet" type="text/css" href="http://localhost/extjstest/extjs-4.0.7/resources/css/ext-all.css"/>
<script type="text/javascript" src="http://localhost/extjstest/extjs-4.0.7/ext-all-dev.js"></script>
<script type="text/javascript" src="app/overrides/Ext.data.reader.Xml.js"></script>
/* file name app/overrides/Ext.data.reader.Xml.js */
Ext.override(Ext.data.reader.Xml,{
extractData: function(root) {
var recordName = this.record;
//<debug>
if (!recordName) {
Ext.Error.raise('Record is a required parameter');
}
//</debug>
if (recordName != root.nodeName) {
//root = Ext.DomQuery.select(recordName, root);
//patch
root = Ext.DomQuery.select('>' + recordName, root);
} else {
root = [root];
}
return this.callParent([root]);
}
});
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment