EXTJS4 XML Store - Displaying

enkei

New Member
I have a Perl script which returns an XML formatted SOAP request to my EXTJS4. Here is the code that loads and displays the XML (this is my first go at EXTJS):\[code\]Ext.onReady(function() { Ext.Loader.setConfig({enabled:true}); Ext.define('accounts', { extend: 'Ext.data.Model', fields: [ {name: 'name', type: 'string'}, {name: 'origin', type: 'string'} ] }); var myStore = Ext.create('Ext.data.Store', { model: 'accounts', proxy: { type: 'ajax', url: 'cgi-bin/runPerl.pl', reader: { type: 'xml', root: 'soap:Body' } }, autoLoad: true }); myStore.on('load', function(store, records, options) { var tpl = new Ext.XTemplate( '<tpl for="Accounts">', '<h1>{values.data.name}</h1>', '<h1>{values.data.origin}</h1>', '</tpl>' ); //tpl.append(Ext.get("output"), store.getRange()); });\[/code\]Here is the XML:\[code\]<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getAccountsResponse xmlns:ns2="http://services.nms.nimsoft.com/"><Accounts><accountId>1</accountId><address></address><city></city><country></country><creationDate>2012-04-11T00:00:00+01:00</creationDate><description></description><fax></fax><name>Network</name><origin>Support_4</origin><phone></phone><postalCode></postalCode><state></state><webSite></webSite></Accounts></ns2:getAccountsResponse></soap:Body></soap:Envelope>\[/code\]Firebug displays the following:\[code\]Ext.DomQuery.pseudos[name] is not a function[Break On This Error] \[/code\]return Ext.DomQuery.pseudos[name](cs, value);I have narrowed this down to the tpl section but for the life of me cannot understand the error I am getting.Can anyone offer advise please? Thanks!
 
Back
Top