My store getting created in render function that one call get fired, but my requirement call should fired conditionally but store instance should create always.
For this requirement I am using following code for create store in render function,
Ext.create('mypage.store.customTreeGridStore', {
storeId: 'myStore',
proxy: {
type: 'rest',
startParam: undefined,
filterParam: undefined,
sortParam: undefined,
paramsAsJson: true,
limitParam: 'pageSize',
pageParam: 'pageNo',
restService: 'rest',
restOperation: 'getOperation',
url: me.urlparams,
autoLoad: true,
actionMethods: {
read: 'POST'
}
}
});
and I have added listener in store
beforeload: function(store, operation, eOpts) {
return booleanFlag;
}
When page is loading I could get beforeLoad boolean flag false and while page refreshing call is not getting fired but Store instance created successfully, but I have text box where I am searching grid records. When I am searching any text in textbox I could not getting any record in grid.
But once booleanFlag is true I can search result in grid successfully . So what is the best way to resolve this issue?