X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/output/Ext.form.BasicForm.html?ds=sidebyside diff --git a/docs/output/Ext.form.BasicForm.html b/docs/output/Ext.form.BasicForm.html index 1b0346aa..be57263b 100644 --- a/docs/output/Ext.form.BasicForm.html +++ b/docs/output/Ext.form.BasicForm.html @@ -1,4 +1,5 @@ -
Properties Methods Events Config Options Direct Link
Observable
  BasicForm

Class Ext.form.BasicForm

Package:Ext.form
Defined In:BasicForm.js
Class:BasicForm
Extends:Observable

Encapsulates the DOM <form> element at the heart of the FormPanel class, and provides +

Observable
+  BasicForm

Class Ext.form.BasicForm

Package:Ext.form
Defined In:BasicForm.js
Class:BasicForm
Extends:Observable

Encapsulates the DOM <form> element at the heart of the FormPanel class, and provides input field management, validation, submission, and form loading services.

By default, Ext Forms are submitted through Ajax, using an instance of Ext.form.Action.Submit. To enable normal browser submission of an Ext Form, use the standardSubmit config option.

@@ -141,21 +142,21 @@ arguments (defaults to false). Providing a data when executing 'load' actions. This is optio...
An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read data when executing 'load' actions. This is optional as there is built-in support for processing JSON. For additional information on using an XMLReader -see the example provided in examples/form/xml-form.html.
BasicForm standardSubmit : Boolean
If set to true, standard HTML form submits are used instead of XHR (Ajax) style -form submissions. (defaults to false)...
If set to true, standard HTML form submits are used instead of XHR (Ajax) style -form submissions. (defaults to false)
-

Note: When using standardSubmit, the options to submit are ignored because Ext's -Ajax infrastracture is bypassed. To pass extra parameters (baseParams and params), you will need to -create hidden fields within the form.

-

The url config option is also bypassed, so set the action as well:

-
PANEL.getForm().getEl().dom.action = 'URL'
-An example encapsulating the above: +see the example provided in examples/form/xml-form.html.
BasicForm standardSubmit : Boolean
If set to true, standard HTML form submits are used instead +of XHR (Ajax) style form submissions. Defaults to false. +...

If set to true, standard HTML form submits are used instead +of XHR (Ajax) style form submissions. Defaults to false.

+

Note: When using standardSubmit, the +options to submit are ignored because +Ext's Ajax infrastracture is bypassed. To pass extra parameters (e.g. +baseParams and params), utilize hidden fields +to submit extra data, for example:

new Ext.FormPanel({
     standardSubmit: true,
     baseParams: {
         foo: 'bar'
     },
-    url: 'myProcess.php',
+    url: 'myProcess.php',
     items: [{
         xtype: 'textfield',
         name: 'userName'
@@ -163,28 +164,32 @@ An example encapsulating the above:
     buttons: [{
         text: 'Save',
         handler: function(){
-            var O = this.ownerCt;
-            if (O.getForm().isValid()) {
-                if (O.url)
-                    O.getForm().getEl().dom.action = O.url;
-                if (O.baseParams) {
-                    for (i in O.baseParams) {
-                        O.add({
+            var fp = this.ownerCt.ownerCt,
+                form = fp.getForm();
+            if (form.isValid()) {
+                // check if there are baseParams and if
+                // hiddent items have been added already
+                if (fp.baseParams && !fp.paramsAdded) {
+                    // add hidden items for all baseParams
+                    for (i in fp.baseParams) {
+                        fp.add({
                             xtype: 'hidden',
                             name: i,
-                            value: O.baseParams[i]
-                        })
+                            value: fp.baseParams[i]
+                        });
                     }
-                    O.doLayout();
+                    fp.doLayout();
+                    // set a custom flag to prevent re-adding
+                    fp.paramsAdded = true;
                 }
-                O.getForm().submit();
+                form.submit();
             }
         }
     }]
 });
BasicForm timeout : Number
Timeout for form actions in seconds (default is 30 seconds).
BasicForm trackResetOnLoad : Boolean
If set to true, reset() resets to the last loaded or setValues() data instead of when the form was first created. De...
If set to true, reset() resets to the last loaded or setValues() data instead of when the form was first created. Defaults to false.
BasicForm url : String
The URL to use for form actions if one isn't supplied in the -doAction options.
BasicForm

Public Properties

PropertyDefined By
 waitTitle : String
The default title to show for the waiting message box (defaults to 'Please Wait...')
BasicForm

Public Properties

PropertyDefined By
 items : MixedCollection
A MixedCollection containing all the Ext.form.Fields in this form.
BasicForm

Public Methods

MethodDefined By