vojta.jina
17 Oct 2009, 12:24 PM
Hi, I spent lot of hours reading tutorials and forum posts, but I still cant solve my problem...
Ext.onReady(function() {
Ext.Direct.addProvider(Ext.Geek.DirectAPI);
var store = new Ext.data.DirectStore(
{
directFn: Stereotype.get,
fields: [
'id', 'aa', 'bb'
],
root: 'result.rows',
idProperty: 'id',
totalProperty: 'total',
paramsAsHash: false
});
store.load({callback: function(){alert('sss');}});
Ext.testingStore = store;
Direct call Stereotype.get returns this json:
{"result":{"rows":[{"id":1,"aa":"aaa","bb":"bbb"},{"id":2,"aa":"xxx","bb":"zzz"}],"total":2,"success":true,"status":true},"type":"rpc","tid":2,"action":"Stereotype","method":"get"}
After execution, I can see the request in the firebug, it looks right...
But when I use this store for grid, grid is empty...
The alert in callback is also not executed.
When I try >> console.log(Ext.testingStore.data.items); its empty !!!
Maybe Im missing something... But I cant find it out...
Thanks a lot for advice..
V.
Ext.onReady(function() {
Ext.Direct.addProvider(Ext.Geek.DirectAPI);
var store = new Ext.data.DirectStore(
{
directFn: Stereotype.get,
fields: [
'id', 'aa', 'bb'
],
root: 'result.rows',
idProperty: 'id',
totalProperty: 'total',
paramsAsHash: false
});
store.load({callback: function(){alert('sss');}});
Ext.testingStore = store;
Direct call Stereotype.get returns this json:
{"result":{"rows":[{"id":1,"aa":"aaa","bb":"bbb"},{"id":2,"aa":"xxx","bb":"zzz"}],"total":2,"success":true,"status":true},"type":"rpc","tid":2,"action":"Stereotype","method":"get"}
After execution, I can see the request in the firebug, it looks right...
But when I use this store for grid, grid is empty...
The alert in callback is also not executed.
When I try >> console.log(Ext.testingStore.data.items); its empty !!!
Maybe Im missing something... But I cant find it out...
Thanks a lot for advice..
V.