I'm currently working on configuring a JsonStore
to utilize a function that runs asynchronously and accepts arguments, but the process is a bit confusing for me.
The function myMethod
requires a callback
, but how can I connect the callback data to the JsonStore
?
store = new Ext.data.JsonStore({
proxy: new Ext.data.DirectProxy(
{
directFn:(new function(){return MyDwrService.myMethod('test')}),
}),
autoLoad:true,...
I attempted to use a DwrProxy
implementation, however, when I omit passing fields
to the JsonReader
, my grid does not display any data. On the other hand, if I do include fields
, it generates numerous empty rows. What am I missing here?
store = new Ext.data.Store({
proxy: new Ext.ux.data.DwrProxy({
apiActionToHandlerMap:{
read: {
dwrFunction: MyService.myMethod,
getDwrArgsFunction: function() {
return ["testUser"]
}
}
}
}),
reader: new Ext.data.JsonReader({fields:myFields}),
autoLoad:true,
fields:myFields,
remoteSort:true
});