title: extjs call Ext.onReady function on class
body: <p>I have this struct:</p>
  
  <pre><code>Example.Form = Ext.extend(Ext.form.FormPanel, {
  // other element
  
   , onSuccess:function(form, action) {
   }
  
  }
  Ext.reg('exampleform', Example.Form);
  
  Ext.onReady(function() {
              var win = new Ext.Window({
                  id:'formloadsubmit-win'
                  ,items:{id:'add', xtype:'exampleform'}
              });
              win.show();
  })
  </code></pre>
  
  <p>I delete extra code above...</p>
  
  <p>I want to do this: when I submit form on function-> onSuccess in Example.Form class able to close window on body. (When success results were submited and than the body of the window that opens become closed)</p>
  
  <p>I apologize for my bad English.</p>