Results 1 to 2 of 2

Thread: Destroy a form in ext 1.1 / Inheritance problem

  1. #1
    Sencha Premium Member Ronaldo's Avatar
    Join Date
    Jul 2007
    Enschede, The Netherlands

    Default Destroy a form in ext 1.1 / Inheritance problem

    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:

    Ext.ux.Form = function(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:

    this.form = new Ext.ux.Form({
                labelAlign: 'right',
                labelWidth: 175,
                buttonAlign: 'right'

  2. #2
    Ext User
    Join Date
    Jun 2007


    Your call to the superclass constructor should be:
    Code:, config);
    I had this exact same problem with undefined config. Turns out I needed to qualify scope as the first parameter. (even though it didn't appear in the signature of the method)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts