PDA

View Full Version : JSONP REST Webservice



Designworxz
10 Oct 2011, 6:33 PM
Am not able to read data from JSONP REST Webservice.



Ext.regModel('Test', { fields: [ {name: 'Branch', type: 'string'}, {name: 'City', type: 'string'} ], proxy:{ type: 'scripttag', url: 'JSONP REST based Service', reader: 'json', method:'GET', autoLoad: false, afterRequest: function (request, success) { if (success) { alert('Successfully loaded '); alert(request.data); console.log('Successfully loaded '); } else { alert('Failed to load '); console.warn('Failed to load '); } console.info(request); } }});


Store = new Ext.data.Store({ model: 'Test' });



Store.load();

Store.getCount(); //gives 0

But in fiddler i can see data coming
stcCallback1001([{"Branch":"abc","City":"123"}]);