PDA

View Full Version : Problems in changing event Store of calendarpanel



Seyran
25 Feb 2014, 12:13 AM
Hello. Now I'm trying to configure my calendarpanel application to work with 2 stores. One store is events of person (busy times) and the second is free times of person like events. And I want to add mode like "Show by free times" by checkbox. Clicking on checkbox I'm changing myCalendarpanel.eventStore by this way

var eventStore;
if(obj.checked == true){
eventStore= Ext.create('Ext.calendar.data.MemoryEventStore', {
data: Ext.calendar.data.Events.getData(freeTimesArr)
});
}else{
eventStore= Ext.create('Ext.calendar.data.MemoryEventStore', {
data: Ext.calendar.data.Events.getData(busyTimesArr)
});
}
Ext.getCmp('app-calendar').eventStore = eventStore;
//Ext.getCmp('app-calendar').eventStore.commitChanges();
Ext.getCmp('app-calendar').eventStore.reload();

After this I see by debugging, that the eventStore of my component changed, but nothing changes on my monitor. I still see events of previous eventStore.
Can anyone give me advise how to resolve this problem, please? :(