PDA

View Full Version : XML Store issue



ByteLess
19 Apr 2014, 6:38 AM
first time trying the xmlstore and having issues.

Can someone tell me what is wrong with my store?


Ext.define('app.store.MyFeedStoreXML', { extend: 'Ext.data.Store',


requires: [
'app.model.MyFeed',
'Ext.data.proxy.JsonP',
'Ext.data.reader.Xml'
],


config: {
autoLoad: true,
model: 'app.model.MyFeed',
pageSize: 30,
storeId: 'MyFeedStoreXML',
proxy: {
type: 'jsonp',
url: 'https://www.facebook.com/feeds/page.php?format=rss20&id=xxxxxxxxxx',
reader: {
type: 'xml',
rootProperty: 'channel',
record: 'item'
}
}
}
});

trying to get the feed from the this url
https://www.facebook.com/feeds/page.php?format=rss20&id=x (https://www.facebook.com/feeds/page.php?format=rss20&id=1122xxxxxxxxxxxx)xxxxxxxxxx

evant
19 Apr 2014, 1:32 PM
Read the docs here: http://docs.sencha.com/ext/5.0.0/apidocs/#!/api/Ext.data.proxy.JsonP

ByteLess
19 Apr 2014, 5:55 PM
Read the docs here: http://docs.sencha.com/ext/5.0.0/apidocs/#!/api/Ext.data.proxy.JsonP

Thank you, but I do know the link to the apidocs.
I couldn't find any working example for the store which using jsonp with xml reader, and thats what I was confused about.

evant
19 Apr 2014, 9:13 PM
You can't. The proxy works by injecting a script tag into the document.

The response has to be json and has to look something like:



someCallback({
// some JSON
});