0
votes

I have a list of Rooms and each rooms have a calender to book. Each time some one clicked on the Room, I am dynamically loading the calender of it. When I load, I will delete the already loaded calender and create new view of the calender. Whenever I am destroying the view(which contains dataview to load calender), the 'updaterecord' is getting called. Is it the default behaviour or is there any other way I can remove or destroy it?

Can some one help me out please.....

1
Hard to say without seeing the actual code you're using. Can you show how you create the view, and how you destroy it? Also, how have you determined that updaterecord is being called? - rixo

1 Answers

0
votes

Take a look at the inherited destroy() method in Ext.Component. It calls this.setRecord(null), which then calls updateRecord() with null.

Try capturing this behaviour using:

updateRecord: function(newRecord) {
    if (newRecord) {
        // do stuff
    }
}