rest - ExtJS 4 proxy Store don't consumes delivered data -


i have 2 grids own proxy store each. each store bound same model following definition:

ext.define('issue', {     extend: 'ext.data.model',     fields : [{         name : 'updated_on',         type : 'string'     }, {         name : 'done_ratio',         type : 'int'     }, {         name : 'start_date',         type : 'string'     }, {         name : 'subject',         type : 'string'     }, {         name : 'due_date',         type : 'string'     }, {         name : 'created_on',         type : 'string'     }, {         name : 'description',         type : 'string'     }, {         name : 'id',         type : 'int'     }, {         name : 'assigned_to',         mapping: 'assigned_to.name'     }, {         name: 'parked',         mapping: 'custom_fields[9].value',         type: 'boolean'     }] }); 

the stores grids , related container buttons etc. created in function. 2 functions looks like:

var createmypanel = function() {         var store = new ext.data.store({             /*sorters: ['gemeinde','assigned_to'],             groupfield: 'gemeinde',*///comment in when want enable grouping             model : 'issue',             autoload: true,             autosync: true,             proxy : {                 type : 'rest',                 url : '/issues.json',                 reader : {                     type : 'json',                     root : 'issues'                 },                 extraparams : runtime.cview.model.getparams('my')             }         });         var groupingfeature = new ext.grid.feature.grouping({             groupheadertpl: 'gemeinde: {name} ({rows.length})'         });         var searching = new ext.ux.grid.feature.searching({             minchars: 3,             mode: 'local',             searchtext: 'suche einschränken',             selectalltext: 'alle felder (ab)wählen',             searchtip: '',             mincharstiptext: 'bitte mindestens 3 zeichen eingeben...',             width: 200         });         var commentbtn = new ext.button({             text: 'kommentar zum gewählten ticket erfassen',             disabled: true,             ticket: null,             margin: 5         });         var togfbtn = new ext.button({             text: 'an gis-fachstelle melden',             disabled: true,             ticket:null,             margin: 5         });         var abbruchbtn = new ext.button({             text: 'als abgebrochen melden',             disabled: true,             ticket:null,             margin: 5         });         var parkbtn = new ext.button({             text: 'ticket zurücklegen',             disabled: true,             ticket:null,             margin: 5         });         var journalpanel = new ext.panel({             title: 'kommentare',             html:'',             border: false,             autoscroll: true,             flex: 30,             padding: '5 5 5 5'         });         var buttonpanel = new ext.panel({             padding: '30 30 10 30',             border: false,             flex: 20,             layout: {                 type: 'vbox',                 align: 'stretch'             },             items:[togfbtn, commentbtn, abbruchbtn, parkbtn]         });         var contentpanel = new ext.panel({             title : 'beschreibung',             border: false,             html:'',             flex: 50,             padding: '5 5 5 5'         });         var southpanel = new ext.panel({             padding: '0 0 5 0',             layout: {                 type: 'hbox',                 align: 'stretch'             },             flex: 30,             items:[contentpanel, journalpanel, buttonpanel]         });          var grid = new ext.grid.panel({             store : store,             autoscroll : true,             flex: 70,             columns : [{                         text : 'ticket-nummer',                         width : 100,                         sortable : true,                         dataindex : 'id',                         menudisabled : true                     }, {                         text : 'abgabe-datum',                         sortable : true,                         width : 100,                         dataindex : 'due_date',                         menudisabled : true                     }, {                         header : 'thema',                         width : 200,                         sortable : true,                         dataindex : 'subject',                         renderer : function(val) {                             return '<div style="white-space:normal !important;">'                                     + val + '</div>';                         },                         menudisabled : true                     }, {                         header : 'gemeinde',                         width : 200,                         sortable : true,                         dataindex : 'gemeinde',                         menudisabled : true                      }, {                         header : 'parzelle',                         width : 200,                         sortable : true,                         dataindex : 'parzelle',                         menudisabled : true                      }, {                         header : 'zurückgelegt',                         width : 200,                         sortable : true,                         dataindex : 'parked',                         menudisabled : true,                         renderer : function(val) {                             if(val){                                 return 'ja';                             }else{                                 return 'nein';                             }                         },                     },{                         header: 'beschreibung',                         dataindex: 'description',                         hidden: true,                         menudisabled : true                     }],             bbar: ['->'],             features: [searching/*, groupingfeature*/],//comment in when want group             selmodel: new ext.selection.rowmodel()         });          var mypanel = new ext.panel({             title: 'meine fälle',             padding: '0 5 0 5',             bl_id:'my',             layout: {                 type: 'vbox',                 align: 'stretch'             },             items : [grid, southpanel]         });         return {             : mypanel,             contentpanel: contentpanel,             grid: grid,             store: store,             togfbtn:togfbtn,             journalpanel:journalpanel,             commentbtn:commentbtn,             southpanel:southpanel,             abbruchbtn:abbruchbtn,             parkbtn:parkbtn         }     }; 

and:

var createallpanel = function() {     var store = new ext.data.store({         /*sorters: ['gemeinde','assigned_to'],         groupfield: 'gemeinde',*///comment in when want enable grouping         model : 'issue',         autoload: true,         autosync: true,         proxy : {             type : 'rest',             url : '/issues.json',             reader : {                 type : 'json',                 root : 'issues'             },             extraparams : runtime.cview.model.getparams('all')         }     });     var groupingfeature = new ext.grid.feature.grouping({         groupheadertpl: 'gemeinde: {name} ({rows.length})'     });     var searching = new ext.ux.grid.feature.searching({         minchars: 3,         mode: 'local',         searchtext: 'suche einschränken',         selectalltext: 'alle felder (ab)wählen',         searchtip: '',         mincharstiptext: 'bitte mindestens 3 zeichen eingeben...',         width: 200     });     var commentbtn = new ext.button({         text: 'kommentar zum gewählten ticket erfassen',         disabled: true,         ticket: null,         margin: 5     });     var togfbtn = new ext.button({         text: 'an gis-fachstelle melden',         disabled: true,         ticket:null,         margin: 5     });     var abbruchbtn = new ext.button({         text: 'als abgebrochen melden',         disabled: true,         ticket:null,         margin: 5     });     var parkbtn = new ext.button({         text: 'ticket zurücklegen',         disabled: true,         ticket:null,         margin: 5     });     var journalpanel = new ext.panel({         title: 'kommentare',         html:'',         border: false,         autoscroll: true,         flex: 30,         padding: '5 5 5 5'     });     var buttonpanel = new ext.panel({         padding: '30 30 10 30',         border: false,         flex: 20,         layout: {             type: 'vbox',             align: 'stretch'         },         items:[togfbtn, commentbtn, abbruchbtn, parkbtn]     });     var contentpanel = new ext.panel({         title : 'beschreibung',         border: false,         html:'',         flex: 50,         padding: '5 5 5 5'     });     var southpanel = new ext.panel({         padding: '0 0 5 0',         layout: {             type: 'hbox',             align: 'stretch'         },         flex: 30,         items:[contentpanel, journalpanel, buttonpanel]     });      var grid = new ext.grid.panel({         store : store,         autoscroll : true,         flex: 70,         columns : [{                     text : 'ticket-nummer',                     width : 100,                     sortable : true,                     dataindex : 'id',                     menudisabled : true                 }, {                     text : 'abgabe-datum',                     sortable : true,                     width : 100,                     dataindex : 'due_date',                     menudisabled : true                 }, {                     header : 'thema',                     width : 200,                     sortable : true,                     dataindex : 'subject',                     renderer : function(val) {                         return '<div style="white-space:normal !important;">'                                 + val + '</div>';                     },                     menudisabled : true                 }, {                     header : 'gemeinde',                     width : 200,                     sortable : true,                     dataindex : 'gemeinde',                     menudisabled : true                  }, {                     header : 'parzelle',                     width : 200,                     sortable : true,                     dataindex : 'parzelle',                     menudisabled : true                  }, {                     header : 'zugewiesen an',                     width : 200,                     sortable : true,                     dataindex : 'assigned_to',                     menudisabled : true                 }, {                     header : 'zurückgelegt',                     width : 200,                     sortable : true,                     dataindex : 'parked',                     menudisabled : true,                     renderer : function(val) {                         if(val){                             return 'ja';                         }else{                             return 'nein';                         }                     },                 },{                     header: 'beschreibung',                     dataindex: 'description',                     hidden: true,                     menudisabled : true                 }],         bbar: ['->'],         features: [searching/*, groupingfeature*/],//comment in when want group         selmodel: new ext.selection.rowmodel()     });      var allpanel = new ext.panel({         title: 'alle fälle',         padding: '0 5 0 5',         bl_id:'all',         layout: {             type: 'vbox',             align: 'stretch'         },         items : [grid, southpanel]     });     return {         : allpanel,         contentpanel: contentpanel,         grid: grid,         store: store,         togfbtn:togfbtn,         journalpanel:journalpanel,         commentbtn:commentbtn,         southpanel:southpanel,         abbruchbtn:abbruchbtn,         parkbtn:parkbtn     } }; 

as can see 2 panels manly same. when load page request started automaticly cause stores have auto load set true. first store loads data well. fine , works expected. ever. second store don't. stalked down following via firebug:

  • store created
  • store bound correctly proxy
  • the load function called
  • data request done
  • data looks should
  • i can inspect answerd objects via firebug

only objects (which in browsers ) not 'loaded' in store. store data items keep zero. after reload again. can't see point here.

something mention: first store has around 50 items hold second 1 220 or more. tried set time out seeting proxy. didn't help. tried switch stores. set store 1 grid 2 , vice versa (it steered params setting in proxy). store less amount of items loads well.

does know issue? can't come conclusion days now.

check out proxy configuration sencha's docs.

http://docs.sencha.com/ext-js/4-1/#!/api/ext.data.reader.json-cfg-totalproperty

and json not in valid json format, verify in json viewers errors.

edit: can listen exceptions thrown data reader: http://docs.sencha.com/ext-js/4-1/#!/api/ext.data.reader.reader-event-exception


Comments