code: function () {
              if (this.validate()) {
                  if (this.beforeSubmitEvent.fire()) {
                      this.doSubmit();
                      this.submitEvent.fire();
      
                      if (this.cfg.getProperty("hideaftersubmit")) {
                          this.hide();
                      }
      
                      return true;
                  } else {
                      return false;
                  }
              } else {
                  return false;
              }
          }
docs: Executes a submit of the Dialog if validation
  is successful. By default the Dialog is hidden
  after submission, but you can set the "hideaftersubmit"
  configuration property to false, to prevent the Dialog
  from being hidden.
  
  @method submit