1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    8
    Vote Rating
    0
    kisundar is on a distinguished road

      0  

    Default Unanswered: How do I access the outer class defintion instance

    Unanswered: How do I access the outer class defintion instance


    Code:
    Ext.define('BuildStatus.view.Login',{
        extend: 'Ext.form.Panel',
        title: 'Login Page',
        url: 'login.jsp',
        defaultType: 'textfield',
        bodyStyle:'padding:5px 5px 0',
        buttonAlign: 'left',
        items: [
            {
                fieldLabel: 'Name',
                name: 'name',
                allowBlank:false
            },
            {
                fieldLabel: 'Password',
                name: 'password',
                allowBlank:false
            }
        ],
        frame:true,
        buttons: [{
            text: 'Login',
            formBind: true,
            //Function that fires when the user clicks the button
            handler: function()
            {
                console.log("button clicked");
                getForm().submit(
                {
                   method: 'POST',
                   waitTitle: 'Connecting',
                   waitMsg: 'Sending data...',
    
                   success: function()
                   {
                      console.log("Login successful.");
                   },
                   failure: function(form, action)
                   {
                      console.log("Login failed.");
                      getForm().reset();
                   }
                });
    
            }
        }]
    })
    Now the question I have is when i run this, i get an error saying that getForm() is undefined. How do I access the form instance when the button is clicked. Kindly advice.

  2. #2
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    311
    Answers
    59
    Vote Rating
    52
    droessner is a jewel in the rough droessner is a jewel in the rough droessner is a jewel in the rough

      0  

    Default


    Inside the button handler you can use this.up('form') to get the form instance.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi