View Full Version : loading directly xml response in Store
shreyasrale
28 Nov 2011, 7:28 AM
hi,
I am currently migratng my app from ext 3.2 to 4.0 version
I have a xml store and I was previously loading it using store.loadData(resposeXML);
where responseXML is response object of a request.
Now in 4.0 I am unable to load this xml data in store?
I have tried
var accountUrlStore
= new Ext.data.Store({
data: response.responseXML,
autoLoad: true,
model:'Account' })
but still not working.
Any help is appreciated.
mitchellsimoens
28 Nov 2011, 12:03 PM
Why aren't you using a proxy with XmlReader on the Store?
shreyasrale
28 Nov 2011, 9:54 PM
Thanks mitchellsimoens for your respnse.
I am not using proxy because I have already made a seperate ajax request and based on this response of that request I want to take different actions.
If I use proxy for my dstore then it will again make ajax request and I dont want this as have data already.
What I think is I would need to build array of ext.data.model from xml and pass it to store.
But this is what reader does.
kamalt
29 Nov 2011, 2:46 PM
Hi,
We have been struggling with the same issue for the past 1 month in Sencha Touch.
We are getting valid XML from response.responseXML, but still the store is not properly loaded.
Any help please??
Thanks,
Kamal T.
mitchellsimoens
29 Nov 2011, 4:14 PM
It's usually the configs in the reader that are important.
kamalt
29 Nov 2011, 4:31 PM
Hi mitchellsimoens,
Please provide an example code snippet which loads a XML store from response.responseXML?
Thanks,
Kamal T
evant
29 Nov 2011, 4:57 PM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Store-method-loadRawData
kamalt
29 Nov 2011, 5:43 PM
Hi,
It seems like the loadRawData method is not available in Sencha Touch. I am getting the below error,
Uncaught TypeError: Object [object Object] has no method 'loadRawData'
Thanks,
Kamal T.
mitchellsimoens
29 Nov 2011, 5:49 PM
This is a forum for Ext JS 4, not Sencha Touch
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.