View Full Version : jsonp store not loading solr results data

12 Aug 2012, 2:23 PM
I am trying to setup a simple store which loads data form a solr search server using jsonp proxy .. i m specifying the callback parameter as well as other solr params .. i am getting a valid response from solr and the json structure matches with what I have specified in the proxy but the store wont load any data .. it just shows a single blank line ..

//model class
Ext.define('GS.model.Grant', {
extend: 'Ext.data.Model',

fields: [
{name: 'id', type: 'string'},
{name: 'title', type: 'string'},

proxy: {
type: 'jsonp',
url: solrSearchUrl,
callbackKey: 'json.wrf',
limitParam: 'rows',
pageParam: 'start',
extraParams: {
q: '*:*',
wt: 'json',
reader: {
type: 'json',
rootProperty: 'response.docs',
totalProperty: 'response.numFound'

//store class
Ext.define('GS.store.Grants', {
extend: 'Ext.data.Store',

requires: ['GS.model.Grant'],

model: 'GS.model.Grant',
autoLoad: true

response from server looks like this

Ext.data.JsonP.callback1({"responseHeader":{"status":0,"QTime":0,"params":{"json.wrf":"Ext.data.JsonP.callback1","wt":"json","rows":"25","fl":"id,title","start":"0","q":"*:*","_dc":"1344810294677"}},"response":{"numFound":2695,"start":0,"docs":[{"id":"FP00002618","title":"Test Grant"},......

any ideas ..

12 Aug 2012, 3:43 PM
Try to use root and total properties instead of rootProperty and totalProperty.