/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_form_BasicForm({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.util.Observable","uses":[],"html":"

Hierarchy

Ext.util.Observable
Ext.form.BasicForm

Files

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

\n\n\n

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

\n\n\n

File Uploads

\n\n\n

File uploads are not performed using Ajax submission, that\nis they are not performed using XMLHttpRequests. Instead the form is submitted in the standard\nmanner with the DOM <form> element temporarily modified to have its\ntarget set to refer\nto a dynamically generated, hidden <iframe> which is inserted into the document\nbut removed after the return data has been gathered.

\n\n\n

The server response is parsed by the browser to create the document for the IFRAME. If the\nserver is using JSON to send the return object, then the\nContent-Type header\nmust be set to \"text/html\" in order to tell the browser to insert the text unchanged into the document body.

\n\n\n

Characters which are significant to an HTML parser must be sent as HTML entities, so encode\n\"<\" as \"&lt;\", \"&\" as \"&amp;\" etc.

\n\n\n

The response text is retrieved from the document, and a fake XMLHttpRequest object\nis created containing a responseText property in order to conform to the\nrequirements of event handlers and callbacks.

\n\n\n

Be aware that file upload packets are sent with the content type multipart/form\nand some server technologies (notably JEE) may require some custom processing in order to\nretrieve parameter names and parameter values from the packet content.

\n\n
Defined By

Config options

Ext.form.BasicForm
view source
: Object
(Optional) If specified load and submit actions will be handled\nwith Ext.form.Action.DirectLoad and Ext.form.Action.D...

(Optional) If specified load and submit actions will be handled\nwith Ext.form.Action.DirectLoad and Ext.form.Action.DirectSubmit.\nMethods which have been imported by Ext.Direct can be specified here to load and submit\nforms.\nSuch as the following:

\n\n
api: {\n    load: App.ss.MyProfile.load,\n    submit: App.ss.MyProfile.submit\n}\n
\n\n\n

Load actions can use paramOrder or paramsAsHash\nto customize how the load method is invoked.\nSubmit actions will always use a standard form submit. The formHandler configuration must\nbe set on the associated server-side method which has been imported by Ext.Direct

\n\n
Ext.form.BasicForm
view source
: Object
Parameters to pass with all requests. ...

Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.

\n\n\n

Parameters are encoded as standard HTTP parameters using Ext.urlEncode.

\n\n
Ext.form.BasicForm
view source
: DataReader
An Ext.data.DataReader (e.g. ...

An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to\nread field error messages returned from 'submit' actions. This is optional\nas there is built-in support for processing JSON.

\n\n\n

The Records which provide messages for the invalid Fields must use the\nField name (or id) as the Record ID, and must contain a field called 'msg'\nwhich contains the error message.

\n\n\n

The errorReader does not have to be a full-blown implementation of a\nDataReader. It simply needs to implement a read(xhr) function\nwhich returns an Array of Records in an object with the following\nstructure:

\n\n\n
{\n    records: recordArray\n}\n
\n\n
Ext.form.BasicForm
view source
: Boolean
Set to true if this form is a file upload. ...

Set to true if this form is a file upload.

\n\n

File uploads are not performed using normal 'Ajax' techniques, that is they are not\nperformed using XMLHttpRequests. Instead the form is submitted in the standard manner with the\nDOM <form> element temporarily modified to have its\ntarget set to refer\nto a dynamically generated, hidden <iframe> which is inserted into the document\nbut removed after the return data has been gathered.

\n\n\n

The server response is parsed by the browser to create the document for the IFRAME. If the\nserver is using JSON to send the return object, then the\nContent-Type header\nmust be set to \"text/html\" in order to tell the browser to insert the text unchanged into the document body.

\n\n\n

Characters which are significant to an HTML parser must be sent as HTML entities, so encode\n\"<\" as \"&lt;\", \"&\" as \"&amp;\" etc.

\n\n\n

The response text is retrieved from the document, and a fake XMLHttpRequest object\nis created containing a responseText property in order to conform to the\nrequirements of event handlers and callbacks.

\n\n\n

Be aware that file upload packets are sent with the content type multipart/form\nand some server technologies (notably JEE) may require some custom processing in order to\nretrieve parameter names and parameter values from the packet content.

\n\n
(optional) A config object containing one or more event handlers to be added to this\nobject during initialization. ...

(optional)

A config object containing one or more event handlers to be added to this\nobject during initialization. This should be a valid listeners config object as specified in the\naddListener example for attaching multiple handlers at once.

\n\n

DOM events from ExtJs Components

\n\n\n

While some ExtJs Component classes export selected DOM events (e.g. \"click\", \"mouseover\" etc), this\n\n\n

is usually only done when extra value can be added. For example the DataView's\nclick event passing the node clicked on. To access DOM\nevents directly from a Component's HTMLElement, listeners must be added to the Element after the Component\nhas been rendered. A plugin can simplify this step:

\n\n
// Plugin is configured with a listeners config object.\n// The Component is appended to the argument list of all handler functions.\nExt.DomObserver = Ext.extend(Object, {\n    constructor: function(config) {\n        this.listeners = config.listeners ? config.listeners : config;\n    },\n\n    // Component passes itself into plugin's init method\n    init: function(c) {\n        var p, l = this.listeners;\n        for (p in l) {\n            if (Ext.isFunction(l[p])) {\n                l[p] = this.createHandler(l[p], c);\n            } else {\n                l[p].fn = this.createHandler(l[p].fn, c);\n            }\n        }\n\n        // Add the listeners to the Element immediately following the render call\n        c.render = c.render.createSequence(function() {\n            var e = c.getEl();\n            if (e) {\n                e.on(l);\n            }\n        });\n    },\n\n    createHandler: function(fn, c) {\n        return function(e) {\n            fn.call(this, e, c);\n        };\n    }\n});\n\nvar combo = new Ext.form.ComboBox({\n\n    // Collapse combo when its element is clicked on\n    plugins: [ new Ext.DomObserver({\n        click: function(evt, comp) {\n            comp.collapse();\n        }\n    })],\n    store: myStore,\n    typeAhead: true,\n    mode: 'local',\n    triggerAction: 'all'\n});\n
\n\n\n

\n
Ext.form.BasicForm
view source
method : String

The request method to use (GET or POST) for form actions if one isn't supplied in the action options.

\n

The request method to use (GET or POST) for form actions if one isn't supplied in the action options.

\n
Ext.form.BasicForm
view source
: Array/String
A list of params to be executed server side. ...

A list of params to be executed server side.\nDefaults to undefined. Only used for the api\nload configuration.

\n\n\n

Specify the params in the order in which they must be executed on the\n\n\n

server-side as either (1) an Array of String values, or (2) a String of params\ndelimited by either whitespace, comma, or pipe. For example,\nany of the following would be acceptable:

\n\n
paramOrder: ['param1','param2','param3']\nparamOrder: 'param1 param2 param3'\nparamOrder: 'param1,param2,param3'\nparamOrder: 'param1|param2|param'\n     
\n\n
Ext.form.BasicForm
view source
: Boolean
Only used for the api\nload configuration. ...

Only used for the api\nload configuration. Send parameters as a collection of named\narguments (defaults to false). Providing a\nparamOrder nullifies this configuration.

\n

Defaults to: false

Ext.form.BasicForm
view source
: DataReader
An Ext.data.DataReader (e.g. ...

An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read\ndata when executing 'load' actions. This is optional as there is built-in\nsupport for processing JSON. For additional information on using an XMLReader\nsee the example provided in examples/form/xml-form.html.

\n
Ext.form.BasicForm
view source
: Boolean
If set to true, standard HTML form submits are used instead\nof XHR (Ajax) style form submissions. ...

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

\n\n\n

Note: When using standardSubmit, the\n\n\n

options to submit are ignored because\nExt's Ajax infrastracture is bypassed. To pass extra parameters (e.g.\nbaseParams and params), utilize hidden fields\nto submit extra data, for example:

\n\n
new Ext.FormPanel({\n    standardSubmit: true,\n    baseParams: {\n        foo: 'bar'\n    },\n    url: 'myProcess.php',\n    items: [{\n        xtype: 'textfield',\n        name: 'userName'\n    }],\n    buttons: [{\n        text: 'Save',\n        handler: function(){\n            var fp = this.ownerCt.ownerCt,\n                form = fp.getForm();\n            if (form.isValid()) {\n                // check if there are baseParams and if\n                // hiddent items have been added already\n                if (fp.baseParams && !fp.paramsAdded) {\n                    // add hidden items for all baseParams\n                    for (i in fp.baseParams) {\n                        fp.add({\n                            xtype: 'hidden',\n                            name: i,\n                            value: fp.baseParams[i]\n                        });\n                    }\n                    fp.doLayout();\n                    // set a custom flag to prevent re-adding\n                    fp.paramsAdded = true;\n                }\n                form.submit();\n            }\n        }\n    }]\n});\n
\n\n
Ext.form.BasicForm
view source
: Number
Timeout for form actions in seconds (default is 30 seconds). ...

Timeout for form actions in seconds (default is 30 seconds).

\n

Defaults to: 30

Ext.form.BasicForm
view source
: Boolean
If set to true, reset() resets to the last loaded\nor setValues() data instead of when the form was first created. ...

If set to true, reset() resets to the last loaded\nor setValues() data instead of when the form was first created. Defaults to false.

\n

Defaults to: false

Ext.form.BasicForm
view source
url : String

The URL to use for form actions if one isn't supplied in the\ndoAction options.

\n

The URL to use for form actions if one isn't supplied in the\ndoAction options.

\n
Ext.form.BasicForm
view source
: String
The default title to show for the waiting message box (defaults to 'Please Wait...') ...

The default title to show for the waiting message box (defaults to 'Please Wait...')

\n

Defaults to: 'Please Wait...'

Defined By

Properties

Ext.form.BasicForm
view source
activeAction : Objectprivate

private

\n

private

\n
Ext.form.BasicForm
view source
items : MixedCollection

A MixedCollection containing all the Ext.form.Fields in this form.

\n

A MixedCollection containing all the Ext.form.Fields in this form.

\n
Ext.form.BasicForm
view source
: Mixed
By default wait messages are displayed with Ext.MessageBox.wait. ...

By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific\nelement by passing it or its id or mask the form itself by passing in true.

\n
Defined By

Methods

Ext.form.BasicForm
view source
new( el, config ) : Ext.form.BasicForm
...
\n

Parameters

  • el : Mixed

    The form element or its id

    \n
  • config : Object

    Configuration options

    \n

Returns

Ext.form.BasicForm
view source
( field1, [field2], [etc] ) : BasicFormchainable
Add Ext.form Components to this form's Collection. ...

Add Ext.form Components to this form's Collection. This does not result in rendering of\nthe passed Component, it just enables the form to validate Fields, and distribute values to\nFields.

\n\n

You will not usually call this function. In order to be rendered, a Field must be added\nto a Container, usually an FormPanel.\nThe FormPanel to which the field is added takes care of adding the Field to the BasicForm's\ncollection.

\n\n

Parameters

  • field1 : Field
    \n
  • field2 : Field (optional)
    \n
  • etc : Field (optional)
    \n

Returns

  • BasicForm

    this

    \n
Adds 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.

\n

Parameters

  • o : Object|String

    Either an object with event names as properties with a value of true\nor the first event name string if multiple event names are being passed as separate parameters.

    \n
  • Optional : string

    . Event name if multiple event names are being passed as separate parameters.\nUsage:

    \n\n
    this.addEvents('storeloaded', 'storecleared');\n
    \n\n
( eventName, handler, [scope], [options] )
Appends an event handler to this object. ...

Appends an event handler to this object.

\n

Parameters

  • eventName : String

    The name of the event to listen for.

    \n
  • handler : Function

    The method the event invokes.

    \n
  • scope : Object (optional)

    The scope (this reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.

    \n
  • options : Object (optional)

    An object containing handler configuration.\nproperties. This may contain any of the following properties:

      \n
    • scope : Object
      The scope (this reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.
    • \n
    • delay : Number
      The number of milliseconds to delay the invocation of the handler after the event fires.
    • \n
    • single : Boolean
      True to add a handler to handle just the next firing of the event, and then remove itself.
    • \n
    • buffer : Number
      Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is not invoked, but the new handler is scheduled in its place.
    • \n
    • target : Observable
      Only call the handler if the event was fired on the target Observable, not\nif the event was bubbled up from a child Observable.
    • \n

    \n\n

    \nCombining Options
    \nUsing the options argument, it is possible to combine different types of listeners:
    \n
    \nA delayed, one-time listener.\n

    myDataView.on('click', this.onClick, this, {\nsingle: true,\ndelay: 100\n});
    \n

    \nAttaching multiple handlers in 1 call
    \nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n

    \n

    myGridPanel.on({\n'click' : {\n    fn: this.onClick,\n    scope: this,\n    delay: 100\n},\n'mouseover' : {\n    fn: this.onMouseOver,\n    scope: this\n},\n'mouseout' : {\n    fn: this.onMouseOut,\n    scope: this\n}\n});
    \n

    \nOr a shorthand syntax:
    \n

    myGridPanel.on({\n'click' : this.onClick,\n'mouseover' : this.onMouseOver,\n'mouseout' : this.onMouseOut,\n scope: this\n});
    \n\n

Ext.form.BasicForm
view source
( action, success )private
private ...

private

\n

Parameters

  • action : Object
    \n
  • success : Object
    \n
Ext.form.BasicForm
view source
( values ) : BasicFormchainable
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.

\n

Parameters

  • values : Object
    \n

Returns

  • BasicForm

    this

    \n
Ext.form.BasicForm
view source
( values ) : BasicFormchainable
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.

\n

Parameters

  • values : Object
    \n

Returns

  • BasicForm

    this

    \n
Ext.form.BasicForm
view source
( action )private
private ...

private

\n

Parameters

  • action : Object
    \n
Ext.form.BasicForm
view source
( fnName, args ) : Ext.form.BasicFormchainableprivate
...
\n

Parameters

  • fnName : Object
    \n
  • args : Object
    \n

Returns

Ext.form.BasicForm
view source
( )
Removes all fields from the collection that have been destroyed. ...

Removes all fields from the collection that have been destroyed.

\n
Ext.form.BasicForm
view source
( ) : BasicFormchainable
Clears all invalid messages in this form. ...

Clears all invalid messages in this form.

\n

Returns

  • BasicForm

    this

    \n
Ext.form.BasicForm
view source
( bound )private
Destroys this object. ...

Destroys this object.

\n

Parameters

  • bound : Boolean

    true if the object is bound to a form panel. If this is the case\nthe FormPanel will take care of destroying certain things, so we're just doubling up.

    \n
Ext.form.BasicForm
view source
( actionName, [options] ) : BasicFormchainable
Performs a predefined action (Ext.form.Action.Submit or\nExt.form.Action.Load) or a custom extension of Ext.form.Actio...

Performs a predefined action (Ext.form.Action.Submit or\nExt.form.Action.Load) or a custom extension of Ext.form.Action\nto perform application-specific processing.

\n

Parameters

  • actionName : String/Object

    The name of the predefined action type,\nor instance of Ext.form.Action to perform.

    \n
  • options : Object (optional)

    The options to pass to the Ext.form.Action.\nAll of the config options listed below are supported by both the\nsubmit and load\nactions unless otherwise noted (custom actions could also accept\nother config options):

      \n\n

    • url : String
      The url for the action (defaults\nto the form's url.)
    • \n\n

    • method : String
      The form method to use (defaults\nto the form's method, or POST if not defined)
    • \n\n

    • params : String/Object

      The params to pass\n(defaults to the form's baseParams, or none if not defined)

      \n\n

      Parameters are encoded as standard HTTP parameters using Ext.urlEncode.

      \n\n\n

    • \n\n

    • headers : Object
      Request headers to set for the action\n(defaults to the form's default headers)
    • \n\n

    • success : Function
      The callback that will\nbe invoked after a successful response (see top of\nsubmit and load\nfor a description of what constitutes a successful response).\nThe function is passed the following parameters:
        \n
      • form : Ext.form.BasicForm
        The form that requested the action
      • \n
      • action : The Action object which performed the operation.

        \n\n
        The action object contains these properties of interest:
        \n\n\n

    • \n\n

    • failure : Function
      The callback that will be invoked after a\nfailed transaction attempt. The function is passed the following parameters:
    • \n\n

    • scope : Object
      The scope in which to call the\ncallback functions (The this reference for the callback functions).
    • \n\n

    • clientValidation : Boolean
      Submit Action only.\nDetermines whether a Form's fields are validated in a final call to\nisValid prior to submission. Set to false\nto prevent this. If undefined, pre-submission field validation is performed.

    \n

Returns

  • BasicForm

    this

    \n
Enables events fired by this Observable to bubble up an owner hierarchy by calling\nthis.getBubbleTarget() if present. ...

Enables events fired by this Observable to bubble up an owner hierarchy by calling\nthis.getBubbleTarget() if present. There is no implementation in the Observable base class.

\n\n\n

This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default\nimplementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\naccess the required target more quickly.

\n\n\n

Example:

\n\n\n
Ext.override(Ext.form.Field, {\n    //  Add functionality to Field's initComponent to enable the change event to bubble\n    initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {\n        this.enableBubble('change');\n    }),\n\n    //  We know that we want Field's events to bubble directly to the FormPanel.\n    getBubbleTarget : function() {\n        if (!this.formPanel) {\n            this.formPanel = this.findParentByType('form');\n        }\n        return this.formPanel;\n    }\n});\n\nvar myForm = new Ext.formPanel({\n    title: 'User Details',\n    items: [{\n        ...\n    }],\n    listeners: {\n        change: function() {\n            // Title goes red if form has been modified.\n            myForm.header.setStyle('color', 'red');\n        }\n    }\n});\n
\n\n

Parameters

  • events : String/Array

    The event name to bubble, or an Array of event names.

    \n
Ext.form.BasicForm
view source
( id ) : Object
Find a Ext.form.Field in this form. ...

Find a Ext.form.Field in this form.

\n

Parameters

Returns

  • Object

    Field

    \n
( eventName, 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).

\n\n\n

An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget)\nby calling enableBubble.

\n\n

Parameters

  • eventName : String

    The name of the event to fire.

    \n
  • args : Object...

    Variable number of parameters are passed to handlers.

    \n

Returns

  • Boolean

    returns false if any of the handlers return false otherwise it returns true.

    \n
Ext.form.BasicForm
view source
( ) : Object
Get the HTML form Element ...

Get the HTML form Element

\n

Returns

Ext.form.BasicForm
view source
( [dirtyOnly] ) : Object
Retrieves the fields in the form as a set of key/value pairs, using the getValue() method. ...

Retrieves the fields in the form as a set of key/value pairs, using the getValue() method.\nIf multiple fields exist with the same name they are returned as an array.

\n

Parameters

  • dirtyOnly : Boolean (optional)

    True to return only fields that are dirty.

    \n

Returns

  • Object

    The values in the form

    \n
Ext.form.BasicForm
view source
( [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.\nIf multiple fields exist with the same name they are returned as an array.

\n\n\n

Note: The values are collected from all enabled HTML input elements within the form, not from\nthe Ext Field objects. This means that all returned values are Strings (or Arrays of Strings) and that the\nvalue can potentially be the emptyText of a field.

\n\n

Parameters

  • asString : Boolean (optional)

    Pass true to return the values as a string. (defaults to false, returning an Object)

    \n

Returns

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

\n

Parameters

  • eventName : String

    The name of the event to check for

    \n

Returns

  • Boolean

    True if the event is being listened for, else false

    \n
Ext.form.BasicForm
view source
( el )private
private ...

private

\n

Parameters

  • el : Object
    \n
Ext.form.BasicForm
view source
( ) : Object
Returns true if any fields in this form have changed from their original values. ...

Returns true if any fields in this form have changed from their original values.

\n\n\n

Note that if this BasicForm was configured with trackResetOnLoad then the\nFields' original values are updated when the values are loaded by setValues\nor loadRecord.

\n\n

Returns

  • Object

    Boolean

    \n
Ext.form.BasicForm
view source
( ) : Object
Returns true if client-side validation on the form is successful. ...

Returns true if client-side validation on the form is successful.

\n

Returns

  • Object

    Boolean

    \n
Ext.form.BasicForm
view source
( options ) : BasicFormchainable
Shortcut to do a load action. ...

Shortcut to do a load action.

\n

Parameters

  • options : Object

    The options to pass to the action (see doAction for details)

    \n

Returns

  • BasicForm

    this

    \n
Ext.form.BasicForm
view source
( record ) : BasicFormchainable
Loads an Ext.data.Record into this form by calling setValues with the\nrecord data. ...

Loads an Ext.data.Record into this form by calling setValues with the\nrecord data.\nSee also trackResetOnLoad.

\n

Parameters

  • record : Record

    The record to load

    \n

Returns

  • BasicForm

    this

    \n
Ext.form.BasicForm
view source
( errors ) : BasicFormchainable
Mark fields in this form invalid in bulk. ...

Mark fields in this form invalid in bulk.

\n

Parameters

  • errors : Array/Object

    Either an array in the form [{id:'fieldId', msg:'The message'},...] or an object hash of {id: msg, id2: msg2}

    \n

Returns

  • BasicForm

    this

    \n
( eventName, handler, [scope], [options] )
Appends an event handler to this object (shorthand for addListener.) ...

Appends an event handler to this object (shorthand for addListener.)

\n

Parameters

  • eventName : String

    The type of event to listen for

    \n
  • handler : Function

    The method the event invokes

    \n
  • scope : Object (optional)

    The scope (this reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.

    \n
  • options : Object (optional)

    An object containing handler configuration.

    \n
Ext.form.BasicForm
view source
( e )private
private ...

private

\n

Parameters

  • e : Object
    \n
Removes all listeners for this object ...

Removes all listeners for this object

\n
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.

\n

Parameters

  • o : Object

    The Observable whose events this object is to relay.

    \n
  • events : Array

    Array of event names to relay.

    \n
Ext.form.BasicForm
view source
( field ) : BasicFormchainable
Removes a field from the items collection (does NOT remove its markup). ...

Removes a field from the items collection (does NOT remove its markup).

\n

Parameters

  • field : Field
    \n

Returns

  • BasicForm

    this

    \n
( eventName, handler, [scope] )
Removes an event handler. ...

Removes an event handler.

\n

Parameters

  • eventName : String

    The type of event the handler was associated with.

    \n
  • handler : Function

    The handler to remove. This must be a reference to the function passed into the addListener call.

    \n
  • scope : Object (optional)

    The scope originally specified for the handler.

    \n
Ext.form.BasicForm
view source
( ) : BasicFormchainable
Iterates through the Fields which have been added to this BasicForm,\nchecks them for an id attribute, and calls Ext.f...

Iterates through the Fields which have been added to this BasicForm,\nchecks them for an id attribute, and calls Ext.form.Field.applyToMarkup on the existing dom element with that id.

\n

Returns

  • BasicForm

    this

    \n
Ext.form.BasicForm
view source
( ) : BasicFormchainable
Resets this form. ...

Resets this form.

\n

Returns

  • BasicForm

    this

    \n
Resume firing events. ...

Resume firing events. (see suspendEvents)\nIf events were suspended using the queueSuspended parameter, then all\nevents fired during event suspension will be sent to any listeners now.

\n
Ext.form.BasicForm
view source
( values ) : BasicFormchainable
Set values for fields in this form in bulk. ...

Set values for fields in this form in bulk.

\n

Parameters

  • values : Array/Object

    Either an array in the form:

    \n\n
    [{id:'clientName', value:'Fred. Olsen Lines'},\n {id:'portOfLoading', value:'FXT'},\n {id:'portOfDischarge', value:'OSL'} ]
    \n\n\n

    or an object hash of the form:

    \n\n
    {\n    clientName: 'Fred. Olsen Lines',\n    portOfLoading: 'FXT',\n    portOfDischarge: 'OSL'\n}
    \n\n

Returns

  • BasicForm

    this

    \n
Ext.form.BasicForm
view source
( options ) : BasicForm
Shortcut to do a submit action. ...

Shortcut to do a submit action.

\n

Parameters

  • options : Object

    The options to pass to the action (see doAction for details).

    \n\n

    Note: this is ignored when using the standardSubmit option.

    \n\n\n

    The following code:

    \n\n\n
    myFormPanel.getForm().submit({\n    clientValidation: true,\n    url: 'updateConsignment.php',\n    params: {\n        newStatus: 'delivered'\n    },\n    success: function(form, action) {\n       Ext.Msg.alert('Success', action.result.msg);\n    },\n    failure: function(form, action) {\n        switch (action.failureType) {\n            case Ext.form.Action.CLIENT_INVALID:\n                Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');\n                break;\n            case Ext.form.Action.CONNECT_FAILURE:\n                Ext.Msg.alert('Failure', 'Ajax communication failed');\n                break;\n            case Ext.form.Action.SERVER_INVALID:\n               Ext.Msg.alert('Failure', action.result.msg);\n       }\n    }\n});\n
    \n\n\n

    would process the following server response for a successful submission:

    \n\n
    {\n    \"success\":true, // note this is Boolean, not string\n    \"msg\":\"Consignment updated\"\n}\n
    \n\n\n

    and the following server response for a failed submission:

    \n\n
    {\n    \"success\":false, // note this is Boolean, not string\n    \"msg\":\"You do not have permission to perform this operation\"\n}\n
    \n\n

Returns

  • BasicForm

    this

    \n
Suspend the firing of all events. ...

Suspend the firing of all events. (see resumeEvents)

\n

Parameters

  • queueSuspended : Boolean

    Pass as true to queue up suspended events to be fired\nafter the resumeEvents call instead of discarding all suspended events;

    \n
( eventName, handler, [scope] )
Removes an event handler (shorthand for removeListener.) ...

Removes an event handler (shorthand for removeListener.)

\n

Parameters

  • eventName : String

    The type of event the handler was associated with.

    \n
  • handler : Function

    The handler to remove. This must be a reference to the function passed into the addListener call.

    \n
  • scope : Object (optional)

    The scope originally specified for the handler.

    \n
Ext.form.BasicForm
view source
( record ) : BasicFormchainable
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.

\n

Parameters

  • record : Record

    The record to edit

    \n

Returns

  • BasicForm

    this

    \n
Defined By

Events

Ext.form.BasicForm
view source
( this, action )
Fires when an action is completed. ...

Fires when an action is completed.

\n

Parameters

Ext.form.BasicForm
view source
( this, action )
Fires when an action fails. ...

Fires when an action fails.

\n

Parameters

Ext.form.BasicForm
view source
( this, action )
Fires before any action is performed. ...

Fires before any action is performed. Return false to cancel the action.

\n

Parameters

","superclasses":["Ext.util.Observable"],"meta":{},"requires":[],"html_meta":{},"statics":{"property":[],"cfg":[],"css_var":[],"method":[],"event":[],"css_mixin":[]},"files":[{"href":"BasicForm.html#Ext-form-BasicForm","filename":"BasicForm.js"}],"linenr":1,"members":{"property":[{"tagname":"property","owner":"Ext.form.BasicForm","meta":{"private":true},"name":"activeAction","id":"property-activeAction"},{"tagname":"property","owner":"Ext.form.BasicForm","meta":{},"name":"items","id":"property-items"},{"tagname":"property","owner":"Ext.form.BasicForm","meta":{},"name":"waitMsgTarget","id":"property-waitMsgTarget"}],"cfg":[{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"api","id":"cfg-api"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"baseParams","id":"cfg-baseParams"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"errorReader","id":"cfg-errorReader"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"fileUpload","id":"cfg-fileUpload"},{"tagname":"cfg","owner":"Ext.util.Observable","meta":{},"name":"listeners","id":"cfg-listeners"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"method","id":"cfg-method"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"paramOrder","id":"cfg-paramOrder"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"paramsAsHash","id":"cfg-paramsAsHash"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"reader","id":"cfg-reader"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"standardSubmit","id":"cfg-standardSubmit"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"timeout","id":"cfg-timeout"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"trackResetOnLoad","id":"cfg-trackResetOnLoad"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"url","id":"cfg-url"},{"tagname":"cfg","owner":"Ext.form.BasicForm","meta":{},"name":"waitTitle","id":"cfg-waitTitle"}],"css_var":[],"method":[{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"constructor","id":"method-constructor"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"add","id":"method-add"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"addEvents","id":"method-addEvents"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"addListener","id":"method-addListener"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"private":true},"name":"afterAction","id":"method-afterAction"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"applyIfToFields","id":"method-applyIfToFields"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"applyToFields","id":"method-applyToFields"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"private":true},"name":"beforeAction","id":"method-beforeAction"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true,"private":true},"name":"callFieldMethod","id":"method-callFieldMethod"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"cleanDestroyed","id":"method-cleanDestroyed"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"clearInvalid","id":"method-clearInvalid"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"private":true},"name":"destroy","id":"method-destroy"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"doAction","id":"method-doAction"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"enableBubble","id":"method-enableBubble"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"findField","id":"method-findField"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"fireEvent","id":"method-fireEvent"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"getEl","id":"method-getEl"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"getFieldValues","id":"method-getFieldValues"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"getValues","id":"method-getValues"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"hasListener","id":"method-hasListener"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"private":true},"name":"initEl","id":"method-initEl"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"isDirty","id":"method-isDirty"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"isValid","id":"method-isValid"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"load","id":"method-load"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"loadRecord","id":"method-loadRecord"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"markInvalid","id":"method-markInvalid"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"on","id":"method-on"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"private":true},"name":"onSubmit","id":"method-onSubmit"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"purgeListeners","id":"method-purgeListeners"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"relayEvents","id":"method-relayEvents"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"remove","id":"method-remove"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"removeListener","id":"method-removeListener"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"render","id":"method-render"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"reset","id":"method-reset"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"resumeEvents","id":"method-resumeEvents"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"setValues","id":"method-setValues"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{},"name":"submit","id":"method-submit"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"suspendEvents","id":"method-suspendEvents"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"un","id":"method-un"},{"tagname":"method","owner":"Ext.form.BasicForm","meta":{"chainable":true},"name":"updateRecord","id":"method-updateRecord"}],"event":[{"tagname":"event","owner":"Ext.form.BasicForm","meta":{},"name":"actioncomplete","id":"event-actioncomplete"},{"tagname":"event","owner":"Ext.form.BasicForm","meta":{},"name":"actionfailed","id":"event-actionfailed"},{"tagname":"event","owner":"Ext.form.BasicForm","meta":{},"name":"beforeaction","id":"event-beforeaction"}],"css_mixin":[]},"inheritable":null,"private":null,"component":false,"name":"Ext.form.BasicForm","singleton":false,"override":null,"inheritdoc":null,"id":"class-Ext.form.BasicForm","mixins":[],"mixedInto":[]});