hi.. sencha forum member I am having one problem with recreating the gridPanel.
I am getting me.store is null and the window comes but with empty data.
I am having taskganttpanel contained in taskwindow. So I load the store from the taskWindow beforeShow event only. Below is my taskWindow code
Code:
Ext.define('rms.view.projectmgt.taskAdd' ,{
extend: 'Ext.Window',
alias : 'widget.taskaddwindow',
id: 'taskaddwindow',
title: 'Task Management Window',
width: '85%',
height: '85%',
closeAction: 'destroy',
closable : true,
modal: true,
constrain: true,
maximizable: true,
stateful: false,
projectid: null, // this will be set before showing window
layout: 'border',
initComponent: function() {
this.layoutConfig = {
align: 'stretch'
};
this.items = [
{
region: 'center',
xtype: 'taskpanel',
//html: 'taskpanel',
width: '85%',
height: '85%'
}
];
this.on({
scope: this,
beforeshow: this.onBeforeShow
});
this.callParent(arguments);
},
onBeforeShow: function() {
var projectid = this.projectid;
if(projectid != null) {
var store = Ext.data.StoreManager.lookup('task');
console.log('BEFOR SHOW ::'+projectid);
store.load({
params: {'projectid': projectid},
callback: function(options, success, response) {
console.log('RESPONSE FROM SERVER :'+response.responseText);
} //callback
});
var dependencyStore = Ext.data.StoreManager.lookup('dependency');
dependencyStore.load();
}
}
});
the window popup comes correctly and the data projectid is also passed correctly to server to query all the task related to project.
But don't able to understand for some reason gives me me.store is null error
My taskWindow has taskganttPanel with beforeload function checking the projectid is null or not, below is my code
Code:
beforeload: function(store,records,options) {
console.log('BEFORE LOAD YAAR panel'+records.params);
console.log('BEFORE LOAD YAAR panel PROJECTID '+records.params['projectid']);
if(records.params['projectid'] != null)
{
return true;
}
else
{
return false;
}
}
please suggest me what's wrong why I am getting me.store is null error, even though my store perfectly load the store with containing data.
Yogendra Singh
Sr. Programmer
Kintudesigns.com