Hi all,
As I load every page using ajax in a div, I'd like to remove everything just created before loading another page.
Therefore, I register all my components, and call the destroy() method of each component when needed. Now I'm creating a form and I do not see a destroy() method for the Ext.form.Form... Is that because there's nothing to destroy()...?
Anyway, I'd expect to have one, to remove/detach all fields in that form, and to remove all html elements again.
So I set out to inherit the form and create a destroy method:
Code:
Ext.ux.Form = function(config){
Ext.ux.Form.superclass.constructor.call(config);
}
Ext.extend(Ext.ux.Form, Ext.form.Form, {
destroy : function() {
alert('destroy form');
}
});
But this code fails on the superclass construtctor call, as here the config is ok, but I stepped into toe superclass constructor (Ext.form.Form) and there the config is empty (undefined). Am I doing something wrong here? Am I missing something?
The call to create the form is:
Code:
this.form = new Ext.ux.Form({
labelAlign: 'right',
labelWidth: 175,
buttonAlign: 'right'
});
TIA
Ronald