Results 1 to 3 of 3

Thread: Uncaught TypeError: Object [object Object] has no method 'getForm'

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1

    Default Uncaught TypeError: Object [object Object] has no method 'getForm'

    Hi All ,

    Thanks in advance.Kindly help me to solve this problem.

    I have created a very simple application in Sencha Architect, a login window. It just has 2 textboxes and a button. The code from the .js file is given below.
    In the following code, when the button is clicked, I get the error
    Uncaught TypeError: Object [object Object] has no method 'getForm'
    Any idea why this could be ?

    I am using IIS7



    Ext.define('MyApp.view.MyPanel', {
    extend: 'Ext.panel.Panel',

    height: 149,
    width: 400,
    title: 'My Panel',

    initComponent: function() {
    var me = this;

    Ext.applyIf(me, {
    items: [
    {
    xtype: 'textfield',
    fieldLabel: 'Username',
    allowBlank: false
    },
    {
    xtype: 'textfield',
    fieldLabel: 'Password'
    },
    {
    xtype: 'button',
    text: 'Login',
    listeners: {
    click: {
    fn: me.onButtonClick,
    scope: me
    }
    }
    }
    ]
    });

    me.callParent(arguments);
    },

    onButtonClick: function(button, e, options) {
    if (this.getForm().isValid()) { this.getForm().submit({
    url: 'kunden.xml',
    success: function(form, action) {
    Ext.Msg.alert('Login Successful!');
    },
    failure: function(form, action) {
    Ext.Msg.alert('Login Failed!');
    }
    });
    }

    }

    });





    Regards
    Manju

  2. #2

    Default

    Hi All,

    I found the problem. I was using the wrong class. The mentioned method is available for Ext.form.Panel, but I was using Ext.panel.Panel.
    So problem solved.

  3. #3

    Default thanks

    Quote Originally Posted by ManjuRenjith View Post
    Hi All,

    I found the problem. I was using the wrong class. The mentioned method is available for Ext.form.Panel, but I was using Ext.panel.Panel.
    So problem solved.
    Thanks for update

Posting Permissions

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