StandardSubmit.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext-form-action-StandardSubmit'>/**
  19. </span> * A class which handles submission of data from {@link Ext.form.Basic Form}s using a standard `&lt;form&gt;` element submit.
  20. * It does not handle the response from the submit.
  21. *
  22. * If validation of the form fields fails, the Form's afterAction method will be called. Otherwise, afterAction will not
  23. * be called.
  24. *
  25. * Instances of this class are only created by a {@link Ext.form.Basic Form} when
  26. * {@link Ext.form.Basic#submit submit}ting, when the form's {@link Ext.form.Basic#standardSubmit} config option is true.
  27. */
  28. Ext.define('Ext.form.action.StandardSubmit', {
  29. extend:'Ext.form.action.Submit',
  30. alias: 'formaction.standardsubmit',
  31. <span id='Ext-form-action-StandardSubmit-cfg-target'> /**
  32. </span> * @cfg {String} target
  33. * Optional target attribute to be used for the form when submitting.
  34. *
  35. * Defaults to the current window/frame.
  36. */
  37. <span id='Ext-form-action-StandardSubmit-method-doSubmit'> /**
  38. </span> * @private
  39. * Perform the form submit. Creates and submits a temporary form element containing an input element for each
  40. * field value returned by {@link Ext.form.Basic#getValues}, plus any configured {@link #params params} or
  41. * {@link Ext.form.Basic#baseParams baseParams}.
  42. */
  43. doSubmit: function() {
  44. var form = this.buildForm();
  45. form.submit();
  46. Ext.removeNode(form);
  47. }
  48. });
  49. </pre>
  50. </body>
  51. </html>