X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/output/Ext.form.BasicForm.html?ds=inline 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 @@ -
Observable 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
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...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.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();
}
}
}]
});
doAction options
.Property | Defined By | |
---|---|---|
waitMsgTarget : Mixed By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
+ doAction options . | BasicForm | |
waitTitle : String The default title to show for the waiting message box (defaults to 'Please Wait...') | BasicForm |
Property | Defined By | |
---|---|---|
items : MixedCollection A MixedCollection containing all the Ext.form.Fields in this form. | BasicForm | |
waitMsgTarget : Mixed By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
element by passing it or i... By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
element by passing it or its id or mask the form itself by passing in true. | BasicForm |
Method | Defined By | |
---|---|---|
BasicForm( Mixed el , Object config )
Parameters:
| BasicForm | |
add( Field field1 , [Field field2 ], [Field etc ] )
@@ -196,9 +201,11 @@ Fields.
You will not usually call this function. In order to be rendered, a Field must be added to a Container, usually an FormPanel. The FormPanel to which the field is added takes care of adding the Field to the BasicForm's -collection. Parameters:
| BasicForm | |
addEvents( Object object )
+collection.Parameters:
| BasicForm | |
addEvents( Object|String o , string Optional. )
:
- voidUsed to define events on this Observable Used to define events on this Observable Parameters:
| Observable | |
addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+ voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. Parameters:
| Observable | |
addListener( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:
| Observable | |
applyIfToFields( Object values )
:
BasicFormCalls Ext.applyIf for all field in this form with the passed object. Calls Ext.applyIf for all field in this form with the passed object. Parameters:
| BasicForm | |
applyToFields( Object values )
:
- BasicFormCalls Ext.apply for all fields in this form with the passed object. Calls Ext.apply for all fields in this form with the passed object. Parameters:
| BasicForm | |
clearInvalid()
+ BasicForm Calls Ext.apply for all fields in this form with the passed object. Calls Ext.apply for all fields in this form with the passed object. Parameters:
| BasicForm | |
cleanDestroyed()
+ :
+ void Removes all fields from the collection that have been destroyed. Removes all fields from the collection that have been destroyed. Parameters:
| BasicForm | |
clearInvalid()
:
BasicForm Clears all invalid messages in this form. Clears all invalid messages in this form. Parameters:
| BasicForm | |
doAction( String/Object actionName , [Object options ] )
:
@@ -302,9 +311,41 @@ callback functions (The this reference for the callback functions).clientValidation : BooleanSubmit Action only.
Determines whether a Form's fields are validated in a final call to
isValid prior to submission. Set to false
-to prevent this. If undefined, pre-submission field validation is performed. Returns:
| BasicForm | |
enableBubble( Object events )
+to prevent this. If undefined, pre-submission field validation is performed.Returns:
| BasicForm | |
enableBubble( String/Array events )
:
- voidUsed to enable bubbling of events Used to enable bubbling of events Parameters:
| Observable | |
findField( String id )
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default +implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to +access the required target more quickly. +Example:
Parameters:
| Observable | |
findField( String id )
:
FieldFind a Ext.form.Field in this form. Find a Ext.form.Field in this form. Parameters:
| BasicForm | |
fireEvent( String eventName , Object... args )
@@ -314,7 +355,11 @@ An event may be set to bubble up an Obse...Fires the An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by calling enableBubble. Parameters:
| Observable | |
getEl()
:
- Ext.Element Get the HTML form Element Get the HTML form Element Parameters:
| BasicForm | |
getValues( [Boolean asString ] )
+ Ext.ElementGet the HTML form Element Get the HTML form Element Parameters:
| BasicForm | |
getFieldValues( [Boolean dirtyOnly ] )
+ :
+ ObjectRetrieves the fields in the form as a set of key/value pairs, using the getValue() method.
+If multiple fields exist w... Retrieves the fields in the form as a set of key/value pairs, using the getValue() method.
+If multiple fields exist with the same name they are returned as an array. Parameters:
| BasicForm | |
getValues( [Boolean asString ] )
:
String/ObjectReturns the fields in this form as an object with key/value pairs as they would be submitted using a standard form su... Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit. If multiple fields exist with the same name they are returned as an array. |