Hello.
I am trying to use Direct b DirectStore in my application, but I have some problems with them.
I write in MVC style and add in my app.js file this:
Code:
Ext.direct.Manager.addProvider({
'type': 'remoting',
'url': '/places/remoting/router/',
'namespace': 'Recruitant.places',
'actions': {
'city': [
{
'formHandler': false,
'name': 'load_cities',
'len': 1
}
]
}
});
Recruitant.places.city.load_cities();
This code work fine, but I try to define Model like this:
Code:
Ext.define('Recruitant.model.City', {
extend: 'Ext.data.Model',
proxy: {
type: 'direct',
url: '/places/remoting/router/',
directFn: 'Recruitant.places.city.load_cities'
},
fields: [
{name: 'id', type: 'int'},
{name: 'name', type: 'string'}
]
});
and DirectStore like this:
Code:
Ext.define('Recruitant.store.Cities', {
extend: 'Ext.data.DirectStore',
model: 'Recruitant.model.City'
});
and in my firebug have error "fn is undefined".
Help me to solve this problem, please.