I am using websql as store's proxy in Sencha Touch. I need to use filter on a store as well as the data in the store has to be saved in the web sql database. The data is set in the database but the filter is not working. I have also tried remoteFilter but it is of no help. Following is the code snippet:
Ext.define('MyApp.store.DummyStore', {
extend: 'Ext.data.Store',
config: {
model: 'MyApp.model.DummyModel',
proxy: {
type: 'sql',
database: 'MyApp',
table: 'Data',
writer: {
type: 'json'
}
}
}
});
Ext.define('MyApp.model.DummyModel', {
extend: 'Ext.data.Model',
config: {
fields: [{
name: 'firstname'
}, {
name: 'lastname'
}]
}
});
Ext.define('MyApp.controller.App',{
extend:'Ext.app.Controller',
config:{
refs:{
view:'view'
},
control:{
view:{
initialize: 'filterStore'
}
}
},
filterStore: function() {
var me=this;
Ext.getStore('DummyStore').filter('firstname','abc', true);
}
});
Any help or suggestion will be appreciated. Thanks