PDA

View Full Version : ExtJS4 Calender issue in MVC



pratik016
24 Jan 2013, 5:31 AM
Hello All,

I have event calender of ExtJS4 MVC. I am loading all events from store load. All is working fine. But once I close window and reopen it, and try to load calender from store it throws me error. I am really helpless on it.
Please help me if anyone have some ideas.

1. My calender is in window.
2. I load event from
Ext.getCmp('app-calendar').eventStore.load();
3. After close and reopen window, I tried to load calander it throws me error


TypeError: el is null





el.removeChild(el.firstChild);



May be because of I remove component and reload this.


{
xtype: 'calendarpanel',
flex: 1,
id: 'app-calendar',
action: 'eventClicked',
height: parseInt(Ext.getBody().getViewSize().height * (0.80)),
eventStore: Ext.getStore('path.Store'),
// eventStore: me.eventStore,
// calendarStore: this.calendarStore,
border: false


}

Pls let me know if any query on question

scottmartin
24 Jan 2013, 10:32 AM
Remove the hard 'id' and use itemId instead with Ext.ComponentQuery

Scott.

pratik016
25 Jan 2013, 3:59 AM
Hello Scott,

thanks for replying. I have removed the id and got store using component query and load store. Still issue is persistence. I don't know wht happening inside.

First time when I try to load event from store it works fine. But window close and reopen it not loads the events.

I think closing window may lost something of the calender. :(

scottmartin
25 Jan 2013, 5:24 AM
Are you closing (destroying), or are you hiding the window?
closeAction : 'hide',

You will need to provide a small test case if this does not help.

pratik016
27 Jan 2013, 9:41 PM
Hello Scott,

I have also did for closeAction change to hide. But it seems like window close will destroy all events.

But fortunately the problem is solved and I am surprising the way how it is solved.

Might be something wrong in extend the proxy from MemoryEventStore..

I have store for loading events in calender which extended from "Ext.calendar.data.MemoryEventStore" class as it should be. But one more proxy provided in this class. Now I have removed proxy from my own store and use the default proxy providing MemoryEventStore class. And problem is solved!!!!

Thanks for support. :)

Pratik