Observable BasicForm
Package: | Ext.form |
Defined In: | BasicForm.js |
Class: | BasicForm |
Extends: | Observable |
Config Options | Defined By | |
---|---|---|
baseParams : Object
Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.
|
BasicForm | |
errorReader : DataReader An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read data when reading validation errors on "submit" a...
An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read data when reading validation errors on "submit" actions. This is completely optional as there is built-in support for processing JSON.
|
BasicForm | |
fileUpload : Boolean Set to true if this form is a file upload. File uploads are not performed using normal "Ajax" techniques, that is the...
Set to true if this form is a file upload.
File uploads are not performed using normal "Ajax" techniques, that is they are not performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the DOM <form> element temporarily modified to have its target set to refer to a dynamically generated, hidden <iframe> which is inserted into the document but removed after the return data has been gathered. The server response is parsed by the browser to create the document for the IFRAME. If the server is using JSON to send the return object, then the Content-Type header must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body. The response text is retrieved from the document, and a fake XMLHttpRequest object is created containing a responseText property in order to conform to the requirements of event handlers and callbacks. Be aware that file upload packets are sent with the content type multipart/form and some server technologies (notably JEE) may require some custom processing in order to retrieve parameter names and parameter values from the packet content. |
BasicForm | |
listeners : Object A config object containing one or more event handlers to be added to this object during initialization. This should b...
A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once.
|
Observable | |
method : String
The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
|
BasicForm | |
reader : DataReader An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read 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.
|
BasicForm | |
standardSubmit : Boolean
If set to true, standard HTML form submits are used instead of XHR (Ajax) style form submissions. (defaults to false)
|
BasicForm | |
timeout : Number
Timeout for form actions in seconds (default is 30 seconds).
|
BasicForm | |
trackResetOnLoad : Boolean
If set to true, form.reset() resets to the last loaded or setValues() data instead of when the form was first created.
|
BasicForm | |
url : String
The URL to use for form actions if one isn't supplied in the action options.
|
BasicForm |
Method | Defined By | |
---|---|---|
BasicForm( Mixed el , Object config )
Parameters:
|
BasicForm | |
add( Field field1 , [Field field2 ], [Field etc ] ) : BasicForm Add Ext.form components to this form.
Add Ext.form components to this form.
Parameters:
|
BasicForm | |
addEvents( Object object ) : void Used to define events on this Observable
Used to define events on this Observable
Parameters:
|
Observable | |
addListener( String eventName , Function handler , [Object scope ], [Object options ] ) : void Appends an event handler to this component
Appends an event handler to this component
Parameters:
|
Observable | |
applyIfToFields( Object values ) : BasicForm Calls 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 ) : BasicForm
|
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 ] ) : BasicForm Performs a predefined action (Ext.form.Action.Submit or
Ext.form.Action.Load) or a custom extension of Ext.form.Actio...
Performs a predefined action (Ext.form.Action.Submit or
Ext.form.Action.Load) or a custom extension of Ext.form.Action
to perform application-specific processing.
Parameters:
|
BasicForm | |
findField( String id ) : Field Find a Ext.form.Field in this form by id, dataIndex, name or hiddenName.
Find a Ext.form.Field in this form by id, dataIndex, name or hiddenName.
Parameters:
|
BasicForm | |
fireEvent( String eventName , Object... args ) : Boolean Fires the specified event with the passed parameters (minus the event name).
Fires the specified event with the passed parameters (minus the event name).
Parameters:
|
Observable | |
getEl() : Ext.Element Get the HTML form Element
Get the HTML form Element
Parameters:
|
BasicForm | |
getValues( [Boolean asString ] ) : String/Object Returns 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.
Parameters:
|
BasicForm | |
hasListener( String eventName ) : Boolean Checks to see if this object has any listeners for a specified event
Checks to see if this object has any listeners for a specified event
Parameters:
|
Observable | |
isDirty() : Boolean Returns true if any fields in this form have changed since their original load.
Returns true if any fields in this form have changed since their original load.
Parameters:
|
BasicForm | |
isValid() : Boolean Returns true if client-side validation on the form is successful.
Returns true if client-side validation on the form is successful.
Parameters:
|
BasicForm | |
load( Object options ) : BasicForm Shortcut to do a load action.
Shortcut to do a load action.
Parameters:
|
BasicForm | |
loadRecord( Record record ) : BasicForm Loads an Ext.data.Record into this form.
Loads an Ext.data.Record into this form.
Parameters:
|
BasicForm | |
markInvalid( Array/Object errors ) : BasicForm Mark fields in this form invalid in bulk.
Mark fields in this form invalid in bulk.
Parameters:
|
BasicForm | |
on( String eventName , Function handler , [Object scope ], [Object options ] ) : void Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
Parameters:
|
Observable | |
purgeListeners() : void Removes all listeners for this object
Removes all listeners for this object
Parameters:
|
Observable | |
relayEvents( Object o , Array events ) : void Relays selected events from the specified Observable as if the events were fired by this.
Relays selected events from the specified Observable as if the events were fired by this.
Parameters:
|
Observable | |
remove( Field field ) : BasicForm Removes a field from the items collection (does NOT remove its markup).
Removes a field from the items collection (does NOT remove its markup).
Parameters:
|
BasicForm | |
removeListener( String eventName , Function handler , [Object scope ] ) : void Removes a listener
Removes a listener
Parameters:
|
Observable | |
render() : BasicForm Iterates through the Fields which have been added to this BasicForm,
checks them for an id attribute, and calls Ext.f...
Iterates through the Fields which have been added to this BasicForm,
checks them for an id attribute, and calls Ext.form.Field.applyToMarkup on the existing dom element with that id.
Parameters:
|
BasicForm | |
reset() : BasicForm Resets this form.
Resets this form.
Parameters:
|
BasicForm | |
resumeEvents() : void Resume firing events. (see suspendEvents)
Resume firing events. (see suspendEvents)
Parameters:
|
Observable | |
setValues( Array/Object values ) : BasicForm Set values for fields in this form in bulk.
Set values for fields in this form in bulk.
Parameters:
|
BasicForm | |
submit( Object options ) : BasicForm Shortcut to do a submit action.
Shortcut to do a submit action.
Parameters:
|
BasicForm | |
suspendEvents() : void Suspend the firing of all events. (see resumeEvents)
Suspend the firing of all events. (see resumeEvents)
Parameters:
|
Observable | |
un( String eventName , Function handler , [Object scope ] ) : void Removes a listener (shorthand for removeListener)
Removes a listener (shorthand for removeListener)
Parameters:
|
Observable | |
updateRecord( Record record ) : BasicForm Persists the values in this form into the passed Ext.data.Record object in a beginEdit/endEdit block.
Persists the values in this form into the passed Ext.data.Record object in a beginEdit/endEdit block.
Parameters:
|
BasicForm |
Event | Defined By | |
---|---|---|
actioncomplete : ( Form this , Action action ) Fires when an action is completed.
Fires when an action is completed.
Listeners will be called with the following arguments:
|
BasicForm | |
actionfailed : ( Form this , Action action ) Fires when an action fails.
Fires when an action fails.
Listeners will be called with the following arguments:
|
BasicForm | |
beforeaction : ( Form this , Action action ) Fires before any action is performed. Return false to cancel the action.
Fires before any action is performed. Return false to cancel the action.
Listeners will be called with the following arguments:
|
BasicForm |