Monday, 15 April 2013

store - Sencha Touch 2.3 ( Unable to load data from a json file in sencha touch 2 ) -



store - Sencha Touch 2.3 ( Unable to load data from a json file in sencha touch 2 ) -

i've trying add together parameter url when json store load i'm taking error "unable load data." here code of store.

ext.define('rssfeed.store.rssfeeds', { extend: 'ext.data.store', requires: [ 'rssfeed.model.rssfeed', 'ext.data.proxy.jsonp', 'ext.data.reader.json' ], config: { model: 'rssfeed.model.rssfeed', storeid: 'rssfeeds', proxy: { type: 'jsonp', url: 'https://ajax.googleapis.com/ajax/services/search/news?v=1.0', reader: { type: 'json', rootproperty: 'responsedata.results' } } }, searchfeed: function(request) { var request="turkey"; ext.getstore('rssfeeds').load({ params: { q:request } }); } });

hi store seems right , tested in local machine.

ext.define('myapp.store.rssfeeds', { extend: 'ext.data.store', requires: [ 'ext.data.proxy.jsonp', 'ext.data.reader.json' ], config: { //model: 'rssfeed.model.rssfeed', fields:['title'], storeid: 'rssfeeds', proxy: { type: 'jsonp', url: 'https://ajax.googleapis.com/ajax/services/search/news?v=1.0', reader: { type: 'json', rootproperty: 'responsedata.results' } } }, searchfeed: function(request) { request = request || ''; ext.getstore('rssfeeds').load({ params: { q:request } }); } });

here's how used it..

var store = ext.create('myapp.store.rssfeeds'); store.searchfeed('philippines');

sencha-touch-2 store rss-reader google-feed-api

No comments:

Post a Comment