Results 1 to 2 of 2

Thread: [2.3] Ext.form.Panel.submit scope problem

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-5063 in 2.3.1.
  1. #1
    Ext JS Premium Member cnelissen's Avatar
    Join Date
    Sep 2007
    Location
    California
    Posts
    226
    Vote Rating
    9
      0  

    Default [2.3] Ext.form.Panel.submit scope problem

    It seems there is a scope problem somewhere in the doBeforeSubmit function of Ext.form.Panel. If you submit a form and pass the current application scope to the submit() method, you get an error on line 656 of form/Panel.js. Here is a testcase showing the issue:

    PHP Code:
    Ext.application({
        
    launch: function() {
            
    this.formPanel Ext.Viewport.add({
                
    xtype'formpanel',
                
    items: [{
                    
    xtype'textfield',
                    
    name'name',
                    
    label'Name'
                
    },{
                    
    xtype'toolbar',
                    
    docked'bottom',
                    
    items: [{
                        
    text'Submit',
                        
    scopethis,
                        
    handler: function() {
                            
    this.formPanel.submit({
                                
    url'/some/backend/script.php',
                                
    scopethis // Passing scope here for success and failure functions
                            
    });
                        }
                    }]
                }]
            });
        }
    }); 
    The exact error is: Uncaught TypeError: Object [object Object] has no method 'setMasked'

    Line 656 reads: me.setMasked(false);

    Upon inspection, it seems "me" is an instance of the application (passed scope) and not an instance of the panel which is why this is erroring.

    This code works as expected under 2.2.1.
    - Clint Nelissen

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,094
    Vote Rating
    136
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Posting Permissions

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