Ext.data.JsonP.Ext_form_Basic({"alternateClassNames":["Ext.form.BasicForm"],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.util.Observable","uses":[],"html":"

Alternate names

Ext.form.BasicForm

Hierarchy

Requires

Files

Provides input field management, validation, submission, and form loading services for the collection\nof Field instances within a Ext.container.Container. It is recommended\nthat you use a Ext.form.Panel as the form container, as that has logic to automatically\nhook up an instance of Ext.form.Basic (plus other conveniences related to field configuration.)

\n\n

Form Actions

\n\n

The Basic class delegates the handling of form loads and submits to instances of Ext.form.action.Action.\nSee the various Action implementations for specific details of each one's functionality, as well as the\ndocumentation for doAction which details the configuration options that can be specified in\neach action call.

\n\n

The default submit Action is Ext.form.action.Submit, which uses an Ajax request to submit the\nform's values to a configured URL. To enable normal browser submission of an Ext form, use the\nstandardSubmit config option.

\n\n

File uploads

\n\n

File uploads are not performed using normal 'Ajax' techniques; see the description for\nhasUpload for details. If you're using file uploads you should read the method description.

\n\n

Example usage:

\n\n
Ext.create('Ext.form.Panel', {\n    title: 'Basic Form',\n    renderTo: Ext.getBody(),\n    bodyPadding: 5,\n    width: 350,\n\n    // Any configuration items here will be automatically passed along to\n    // the Ext.form.Basic instance when it gets created.\n\n    // The form will submit an AJAX request to this URL when submitted\n    url: 'save-form.php',\n\n    items: [{\n        xtype: 'textfield',\n        fieldLabel: 'Field',\n        name: 'theField'\n    }],\n\n    buttons: [{\n        text: 'Submit',\n        handler: function() {\n            // The getForm() method returns the Ext.form.Basic instance:\n            var form = this.up('form').getForm();\n            if (form.isValid()) {\n                // Submit the Ajax request and handle the response\n                form.submit({\n                    success: function(form, action) {\n                       Ext.Msg.alert('Success', action.result.message);\n                    },\n                    failure: function(form, action) {\n                        Ext.Msg.alert('Failed', action.result ? action.result.message : 'No response');\n                    }\n                });\n            }\n        }\n    }]\n});\n
\n
Defined By

Config options

Ext.form.Basic
view source
: Object
If specified, load and submit actions will be handled with DirectLoad\nand DirectSubmit. ...

If specified, load and submit actions will be handled with DirectLoad\nand DirectSubmit. Methods which have been imported by\nExt.direct.Manager can be specified here to load and submit forms. API methods may also be\nspecified as strings. See Ext.data.proxy.Direct.directFn. Such as the following:

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

Load actions can use paramOrder or paramsAsHash to customize how the load method\nis invoked. Submit actions will always use a standard form submit. The formHandler configuration\n(see Ext.direct.RemotingProvider#action) must be set on the associated server-side method which has\nbeen imported by Ext.direct.Manager.

\n
Parameters to pass with all requests. ...

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

\n\n

Parameters are encoded as standard HTTP parameters using Ext.Object.toQueryString.

\n
An Ext.data.reader.Reader (e.g. ...

An Ext.data.reader.Reader (e.g. Ext.data.reader.Xml) instance or\nconfiguration to be used to read field error messages returned from 'submit' actions.\nThis is optional as there is built-in support for processing JSON responses.

\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

The errorReader does not have to be a full-blown implementation of a\nReader. 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    records: recordArray\n}\n
\n
If set to true, the field values are sent as JSON in the request body. ...

If set to true, the field values are sent as JSON in the request body.\nAll of the field values, plus any additional params configured via baseParams\nand/or the options to submit, will be included in the values POSTed in the body of the request.

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

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

\n\n

DOM events from Ext JS Components

\n\n

While some Ext JS Component classes export selected DOM events (e.g. \"click\", \"mouseover\" etc), this is usually\nonly done when extra value can be added. For example the DataView's itemclick event passing the node clicked on. To access DOM events directly from a\nchild element of a Component, we need to specify the element option to identify the Component property to add a\nDOM listener to:

\n\n
new Ext.panel.Panel({\n    width: 400,\n    height: 200,\n    dockedItems: [{\n        xtype: 'toolbar'\n    }],\n    listeners: {\n        click: {\n            element: 'el', //bind to the underlying el property on the panel\n            fn: function(){ console.log('click el'); }\n        },\n        dblclick: {\n            element: 'body', //bind to the underlying body property on the panel\n            fn: function(){ console.log('dblclick body'); }\n        }\n    }\n});\n
\n
Ext.form.Basic
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
A list of params to be executed server side. ...

A list of params to be executed server side. Only used for the api load\nconfiguration.

\n\n

Specify the params in the order in which they must be executed on the\nserver-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
Only used for the api load configuration. ...

Only used for the api load configuration. If true, parameters will be sent as a\nsingle hash collection of named arguments. Providing a paramOrder nullifies this\nconfiguration.

\n

Defaults to: false

An Ext.data.reader.Reader (e.g. ...

An Ext.data.reader.Reader (e.g. Ext.data.reader.Xml) instance or\nconfiguration to be used to read data when executing 'load' actions. This\nis optional as there is built-in support for processing JSON responses.

\n
If set to true, a standard HTML form submit is used instead of a XHR (Ajax) style form submission. ...

If set to true, a standard HTML form submit is used instead of a XHR (Ajax) style form submission.\nAll of the field values, plus any additional params configured via baseParams\nand/or the options to submit, will be included in the values submitted in the form.

\n
Ext.form.Basic
view source
: Number
Timeout for form actions in seconds. ...

Timeout for form actions in seconds.

\n

Defaults to: 30

If set to true, reset() resets to the last loaded or setValues() data instead of\nwhen the form was first created. ...

If set to true, reset() resets to the last loaded or setValues() data instead of\nwhen the form was first created.

\n

Defaults to: false

Ext.form.Basic
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.Basic
view source
: String/HTMLElement/Ext.Element
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
The default title to show for the waiting message box ...

The default title to show for the waiting message box

\n

Defaults to: 'Please Wait...'

Properties

Defined By

Instance Properties

...
\n

Defaults to: 'Ext.Base'

...
\n

Defaults to: {}

Initial suspended call count. ...

Initial suspended call count. Incremented when suspendEvents is called, decremented when resumeEvents is called.

\n

Defaults to: 0

This object holds a key for any event that has a listener. ...

This object holds a key for any event that has a listener. The listener may be set\ndirectly on the instance, or on its class or a super class (via observe) or\non the MVC EventBus. The values of this object are truthy\n(a non-zero number) and falsy (0 or undefined). They do not represent an exact count\nof listeners. The value for an event is truthy if the event must be fired and is\nfalsy if there is no need to fire the event.

\n\n

The intended use of this property is to avoid the expense of fireEvent calls when\nthere are no listeners. This can be particularly helpful when one would otherwise\nhave to call fireEvent hundreds or thousands of times. It is used like this:

\n\n
 if (this.hasListeners.foo) {\n     this.fireEvent('foo', this, arg1);\n }\n
\n
...
\n

Defaults to: []

...
\n

Defaults to: {}

...
\n

Defaults to: true

true in this class to identify an object as an instantiated Observable, or subclass thereof. ...

true in this class to identify an object as an instantiated Observable, or subclass thereof.

\n

Defaults to: true

The container component to which this BasicForm is attached.

\n

The container component to which this BasicForm is attached.

\n
Get the reference to the current class from which this object was instantiated. ...

Get the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison

\n\n
Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); // dependent on 'this'\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n
\n
Ext.form.Basic
view source
: Booleanprivate
Private ...

Private

\n

Defaults to: false

Defined By

Static Properties

...
\n

Defaults to: []

Methods

Defined By

Instance Methods

Ext.form.Basic
view source
new( owner, config ) : Ext.form.Basic
Creates new form. ...

Creates new form.

\n

Parameters

Returns

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

  • eventNames : Object/String...

    Either an object with event names as properties with\na value of true. For example:

    \n\n
    this.addEvents({\n    storeloaded: true,\n    storecleared: true\n});\n
    \n\n

    Or any number of event names as separate parameters. For example:

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

Appends an event handler to this object. For example:

\n\n
myGridPanel.on(\"mouseover\", this.onMouseOver, this);\n
\n\n

The method also allows for a single argument to be passed which is a config object\ncontaining properties which specify multiple events. For example:

\n\n
myGridPanel.on({\n    cellClick: this.onCellClick,\n    mouseover: this.onMouseOver,\n    mouseout: this.onMouseOut,\n    scope: this // Important. Ensure \"this\" is correct during handler execution\n});\n
\n\n

One can also specify options for each event handler separately:

\n\n
myGridPanel.on({\n    cellClick: {fn: this.onCellClick, scope: this, single: true},\n    mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n
\n\n

Names of methods in a specified scope may also be used. Note that\nscope MUST be specified to use this option:

\n\n
myGridPanel.on({\n    cellClick: {fn: 'onCellClick', scope: this, single: true},\n    mouseover: {fn: 'onMouseOver', scope: panel}\n});\n
\n

Parameters

  • eventName : String/Object

    The name of the event to listen for.\nMay also be an object who's property names are event names.

    \n\n
  • fn : Function (optional)

    The method the event invokes, or if scope is specified, the name* of the method within\nthe specified scope. Will be called with arguments\ngiven to fireEvent plus the options parameter described below.

    \n\n
  • scope : Object (optional)

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

    \n\n
  • options : Object (optional)

    An object containing handler configuration.

    \n\n\n\n\n

    Note: Unlike in ExtJS 3.x, the options object will also be passed as the last\nargument to every event handler.

    \n\n\n\n\n

    This object may contain any of the following properties:

    \n\n
    • scope : Object

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

      \n\n
    • delay : Number

      The number of milliseconds to delay the invocation of the handler after the event fires.

      \n\n
    • single : Boolean

      True to add a handler to handle just the next firing of the event, and then remove itself.

      \n\n
    • buffer : Number

      Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed\n by the specified number of milliseconds. If the event fires again within that time,\n the original handler is not invoked, but the new handler is scheduled in its place.

      \n\n
    • target : Ext.util.Observable

      Only call the handler if the event was fired on the target Observable, not if the event\n was bubbled up from a child Observable.

      \n\n
    • element : String

      This option is only valid for listeners bound to Components.\n The name of a Component property which references an element to add a listener to.

      \n\n\n\n\n

      This option is useful during Component construction to add DOM event listeners to elements of\n Components which will exist only after the Component is rendered.\n For example, to add a click listener to a Panel's body:

      \n\n\n\n\n
        new Ext.panel.Panel({\n      title: 'The title',\n      listeners: {\n          click: this.handlePanelClick,\n          element: 'body'\n      }\n  });\n
      \n\n
    • destroyable : Boolean (optional)

      When specified as true, the function returns A Destroyable object. An object which implements the destroy method which removes all listeners added in this call.

      \n\n

      Defaults to: false

    • priority : Number (optional)

      An optional numeric priority that determines the order in which event handlers\n are run. Event handlers with no priority will be run as if they had a priority\n of 0. Handlers with a higher priority will be prioritized to run sooner than\n those with a lower priority. Negative numbers can be used to set a priority\n lower than the default. Internally, the framework uses a range of 1000 or\n greater, and -1000 or lesser for handers that are intended to run before or\n after all others, so it is recommended to stay within the range of -999 to 999\n when setting the priority of event handlers in application-level code.

      \n\n\n\n\n

      Combining Options

      \n\n\n\n\n

      Using the options argument, it is possible to combine different types of listeners:

      \n\n\n\n\n

      A delayed, one-time listener.

      \n\n\n\n\n
      myPanel.on('hide', this.handleClick, this, {\n    single: true,\n    delay: 100\n});\n
      \n\n

Returns

  • Object

    Only when the destroyable option is specified.

    \n\n\n\n\n

    A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example:

    \n\n\n\n\n
    this.btnListeners =  = myButton.on({\n    destroyable: true\n    mouseover:   function() { console.log('mouseover'); },\n    mouseout:    function() { console.log('mouseout'); },\n    click:       function() { console.log('click'); }\n});\n
    \n\n\n\n\n

    And when those listeners need to be removed:

    \n\n\n\n\n
    Ext.destroy(this.btnListeners);\n
    \n\n\n\n\n

    or

    \n\n\n\n\n
    this.btnListeners.destroy();\n
    \n\n
( item, ename, [fn], [scope], [options] ) : Object
Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestr...

Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestroyed.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item to which to add a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
  • options : Object (optional)

    If the ename parameter was an event name, this is the\naddListener options.

    \n\n

Returns

  • Object

    Only when the destroyable option is specified.

    \n\n\n\n\n

    A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example:

    \n\n\n\n\n
    this.btnListeners =  = myButton.mon({\n    destroyable: true\n    mouseover:   function() { console.log('mouseover'); },\n    mouseout:    function() { console.log('mouseout'); },\n    click:       function() { console.log('click'); }\n});\n
    \n\n\n\n\n

    And when those listeners need to be removed:

    \n\n\n\n\n
    Ext.destroy(this.btnListeners);\n
    \n\n\n\n\n

    or

    \n\n\n\n\n
    this.btnListeners.destroy();\n
    \n\n
Ext.form.Basic
view source
( action, success )private
Called after an action is performed via doAction. ...

Called after an action is performed via doAction.

\n

Parameters

  • action : Ext.form.action.Action

    The Action instance that was invoked

    \n
  • success : Boolean

    True if the action completed successfully, false, otherwise.

    \n
Ext.form.Basic
view source
( obj ) : Ext.form.Basicchainable
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

  • obj : Object

    The object to be applied

    \n

Returns

Ext.form.Basic
view source
( obj ) : Ext.form.Basicchainable
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

  • obj : Object

    The object to be applied

    \n

Returns

Ext.form.Basic
view source
( action )private
Called before an action is performed via doAction. ...

Called before an action is performed via doAction.

\n

Parameters

( args ) : Objectdeprecatedprotected
Call the original method that was previously overridden with override\n\nExt.define('My.Cat', {\n constructor: functi...

Call the original method that was previously overridden with override

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n
\n

This method has been deprecated

\n

as of 4.1. Use callParent instead.

\n\n
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callOverridden(arguments)

    \n

Returns

  • Object

    Returns the result of calling the overridden method

    \n
Call the \"parent\" method of the current method. ...

Call the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see Ext.define).

\n\n
 Ext.define('My.Base', {\n     constructor: function (x) {\n         this.x = x;\n     },\n\n     statics: {\n         method: function (x) {\n             return x;\n         }\n     }\n });\n\n Ext.define('My.Derived', {\n     extend: 'My.Base',\n\n     constructor: function () {\n         this.callParent([21]);\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // alerts 21\n
\n\n

This can be used with an override as follows:

\n\n
 Ext.define('My.DerivedOverride', {\n     override: 'My.Derived',\n\n     constructor: function (x) {\n         this.callParent([x*2]); // calls original My.Derived constructor\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // now alerts 42\n
\n\n

This also works with static methods.

\n\n
 Ext.define('My.Derived2', {\n     extend: 'My.Base',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Base.method\n         }\n     }\n });\n\n alert(My.Base.method(10);     // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n
\n\n

Lastly, it also works with overridden static methods.

\n\n
 Ext.define('My.Derived2Override', {\n     override: 'My.Derived2',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Derived2.method\n         }\n     }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n
\n\n

To override a method and replace it and also call the superclass method, use\ncallSuper. This is often done to patch a method to fix a bug.

\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callParent(arguments)

    \n

Returns

  • Object

    Returns the result of calling the parent method

    \n
This method is used by an override to call the superclass method but bypass any\noverridden method. ...

This method is used by an override to call the superclass method but bypass any\noverridden method. This is often done to \"patch\" a method that contains a bug\nbut for whatever reason cannot be fixed directly.

\n\n

Consider:

\n\n
 Ext.define('Ext.some.Class', {\n     method: function () {\n         console.log('Good');\n     }\n });\n\n Ext.define('Ext.some.DerivedClass', {\n     method: function () {\n         console.log('Bad');\n\n         // ... logic but with a bug ...\n\n         this.callParent();\n     }\n });\n
\n\n

To patch the bug in DerivedClass.method, the typical solution is to create an\noverride:

\n\n
 Ext.define('App.paches.DerivedClass', {\n     override: 'Ext.some.DerivedClass',\n\n     method: function () {\n         console.log('Fixed');\n\n         // ... logic but with bug fixed ...\n\n         this.callSuper();\n     }\n });\n
\n\n

The patch method cannot use callParent to call the superclass method since\nthat would call the overridden method containing the bug. In other words, the\nabove patch would only produce \"Fixed\" then \"Good\" in the console log, whereas,\nusing callParent would produce \"Fixed\" then \"Bad\" then \"Good\".

\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callSuper(arguments)

    \n

Returns

  • Object

    Returns the result of calling the superclass method

    \n
...
\n

Parameters

Ext.form.Basic
view source
( )
Check whether the dirty state of the entire form has changed since it was last checked, and\nif so fire the dirtychang...

Check whether the dirty state of the entire form has changed since it was last checked, and\nif so fire the dirtychange event. This is automatically invoked\nwhen an individual field's dirty state changes.

\n
Ext.form.Basic
view source
( )private
...
\n
Ext.form.Basic
view source
( )
Check whether the validity of the entire form has changed since it was last checked, and\nif so fire the validitychang...

Check whether the validity of the entire form has changed since it was last checked, and\nif so fire the validitychange event. This is automatically invoked\nwhen an individual field's validity changes.

\n
Ext.form.Basic
view source
( )private
...
\n
Ext.form.Basic
view source
( ) : Ext.form.Basicchainable
Clears all invalid field messages in this form. ...

Clears all invalid field messages in this form.

\n

Returns

Removes all listeners for this object including the managed listeners ...

Removes all listeners for this object including the managed listeners

\n
Removes all managed listeners for this object. ...

Removes all managed listeners for this object.

\n
( eventName, args, bubbles )private
Continue to fire event. ...

Continue to fire event.

\n

Parameters

Creates an event handling function which refires the event from this object as the passed event name. ...

Creates an event handling function which refires the event from this object as the passed event name.

\n

Parameters

  • newName : String

    The name under which to refire the passed parameters.

    \n
  • beginEnd : Array (optional)

    The caller can specify on which indices to slice.

    \n

Returns

Ext.form.Basic
view source
( )
Destroys this object. ...

Destroys this object.

\n

Overrides: Ext.Base.destroy

Ext.form.Basic
view source
( action, [options] ) : Ext.form.Basicchainable
Performs a predefined action (an implementation of Ext.form.action.Action) to perform application-\nspecific processing. ...

Performs a predefined action (an implementation of Ext.form.action.Action) to perform application-\nspecific processing.

\n

Parameters

  • action : String/Ext.form.action.Action

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

    \n
  • options : Object (optional)

    The options to pass to the Ext.form.action.Action that will get created,\nif the action argument is a String.

    \n\n

    All of the config options listed below are supported by both the submit and\nload actions unless otherwise noted (custom actions could also accept other\nconfig options):

    \n
    • url : String

      The url for the action (defaults to the form's url.)

      \n
    • method : String

      The form method to use (defaults to the form's method, or POST if not defined)

      \n
    • params : String/Object

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

      \n\n

      Parameters are encoded as standard HTTP parameters using Ext.Object.toQueryString.

      \n
    • headers : Object

      Request headers to set for the action.

      \n
    • success : Function

      The callback that will be invoked after a successful response (see top of submit\nand load for a description of what constitutes a successful response).

      \n

      Parameters

    • failure : Function

      The callback that will be invoked after a failed transaction attempt.

      \n

      Parameters

    • scope : Object

      The scope in which to call the callback functions (The this reference for the callback functions).

      \n
    • clientValidation : Boolean

      Submit 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\nfield validation is performed.

      \n

Returns

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

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

\n\n

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

\n\n

Example:

\n\n
Ext.define('Ext.overrides.form.field.Base', {\n    override: 'Ext.form.field.Base',\n\n    //  Add functionality to Field's initComponent to enable the change event to bubble\n    initComponent: function () {\n        this.callParent();\n        this.enableBubble('change');\n    }\n});\n\nvar myForm = Ext.create('Ext.form.Panel', {\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

Parameters

  • eventNames : String/String[]

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

    \n
Find a specific Ext.form.field.Field in this form by id or name. ...

Find a specific Ext.form.field.Field in this form by id or name.

\n

Parameters

Returns

Fires the specified event with the passed parameters (minus the event name, plus the options object passed\nto addList...

Fires the specified event with the passed parameters (minus the event name, plus the options object passed\nto addListener).

\n\n

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

\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
Fires the specified event with the passed parameter list. ...

Fires the specified event with the passed parameter list.

\n\n

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

\n

Parameters

  • eventName : String

    The name of the event to fire.

    \n
  • args : Object[]

    An array of parameters which are passed to handlers.

    \n

Returns

  • Boolean

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

    \n
Finds and returns the set of all items bound to fields inside this form ...

Finds and returns the set of all items bound to fields inside this form

\n

Returns

Gets the bubbling parent for an Observable ...

Gets the bubbling parent for an Observable

\n

Returns

...
\n

Parameters

Ext.form.Basic
view source
( [dirtyOnly] ) : Object
Retrieves the fields in the form as a set of key/value pairs, using their\ngetModelData() method to collect the values. ...

Retrieves the fields in the form as a set of key/value pairs, using their\ngetModelData() method to collect the values.\nIf multiple fields return values under the same name those values will be combined into an Array.\nThis is similar to getValues except that this method collects type-specific data values\n(e.g. Date objects for date fields) while getValues returns only String values for submission.

\n

Parameters

  • dirtyOnly : Boolean (optional)

    If true, only fields that are dirty will be included in the result.

    \n

    Defaults to: false

Returns

Return all the Ext.form.field.Field components in the owner container. ...

Return all the Ext.form.field.Field components in the owner container.

\n

Returns

Returns the initial configuration passed to constructor when instantiating\nthis class. ...

Returns the initial configuration passed to constructor when instantiating\nthis class.

\n

Parameters

  • name : String (optional)

    Name of the config option to return.

    \n

Returns

  • Object/Mixed

    The full config object or a single config value\nwhen name parameter specified.

    \n
Returns the last Ext.data.Model instance that was loaded via loadRecord ...

Returns the last Ext.data.Model instance that was loaded via loadRecord

\n

Returns

Ext.form.Basic
view source
( [asString], [dirtyOnly], [includeEmptyText], [useDataValues] ) : String/Object
Retrieves the fields in the form as a set of key/value pairs, using their\ngetSubmitData() method to collect the values. ...

Retrieves the fields in the form as a set of key/value pairs, using their\ngetSubmitData() method to collect the values.\nIf multiple fields return values under the same name those values will be combined into an Array.\nThis is similar to getFieldValues except that this method\ncollects only String values for submission, while getFieldValues collects type-specific data\nvalues (e.g. Date objects for date fields.)

\n

Parameters

  • asString : Boolean (optional)

    If true, will return the key/value collection as a single\nURL-encoded param string.

    \n

    Defaults to: false

  • dirtyOnly : Boolean (optional)

    If true, only fields that are dirty will be included in the result.

    \n

    Defaults to: false

  • includeEmptyText : Boolean (optional)

    If true, the configured emptyText of empty fields will be used.

    \n

    Defaults to: false

  • useDataValues : Boolean (optional)

    If true, the getModelData\nmethod is used to retrieve values from fields, otherwise the getSubmitData\nmethod is used.

    \n

    Defaults to: false

Returns

...
\n

Parameters

Returns true if the form contains any invalid fields. ...

Returns true if the form contains any invalid fields. No fields will be marked as invalid\nas a result of calling this; to trigger marking of fields use isValid instead.

\n
Checks to see if this object has any listeners for a specified event, or whether the event bubbles. ...

Checks to see if this object has any listeners for a specified event, or whether the event bubbles. The answer\nindicates whether the event needs firing or not.

\n

Parameters

  • eventName : String

    The name of the event to check for

    \n

Returns

  • Boolean

    true if the event is being listened for or bubbles, else false

    \n
Ext.form.Basic
view source
( ) : Boolean
Returns true if the form contains a file upload field. ...

Returns true if the form contains a file upload field. This is used to determine the method for submitting the\nform: File uploads are not performed using normal 'Ajax' techniques, that is they are not performed using\nXMLHttpRequests. Instead a hidden <form> element containing all the fields is created temporarily and submitted\nwith its target set to refer to a dynamically generated, hidden <iframe> which is inserted into the document\nbut removed after the return data has been gathered.

\n\n

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

\n\n

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

\n\n

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

\n\n

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

\n

Returns

( config ) : Ext.Basechainableprotected
Initialize configuration for this class. ...

Initialize configuration for this class. a typical example:

\n\n
Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\n

Parameters

Returns

Ext.form.Basic
view source
( )private
Do any post layout initialization ...

Do any post layout initialization

\n
Ext.form.Basic
view source
( ) : Boolean
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

Note that if this BasicForm was configured with trackResetOnLoad then the Fields' original values are updated when the values are\nloaded by setValues or loadRecord.

\n

Returns

Ext.form.Basic
view source
( ) : Boolean
Returns true if client-side validation on the form is successful. ...

Returns true if client-side validation on the form is successful. Any invalid fields will be\nmarked as invalid. If you only want to determine overall form validity without marking anything,\nuse hasInvalidField instead.

\n

Returns

Ext.form.Basic
view source
( options ) : Ext.form.Basicchainable
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

Ext.form.Basic
view source
( record ) : Ext.form.Basicchainable
Loads an Ext.data.Model into this form by calling setValues with the\nrecord data. ...

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

\n

Parameters

Returns

Ext.form.Basic
view source
( errors ) : Ext.form.Basicchainable
Mark fields in this form invalid in bulk. ...

Mark fields in this form invalid in bulk.

\n

Parameters

Returns

( item, ename, [fn], [scope], [options] ) : Object
Shorthand for addManagedListener. ...

Shorthand for addManagedListener.

\n\n

Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestroyed.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item to which to add a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
  • options : Object (optional)

    If the ename parameter was an event name, this is the\naddListener options.

    \n\n

Returns

  • Object

    Only when the destroyable option is specified.

    \n\n\n\n\n

    A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example:

    \n\n\n\n\n
    this.btnListeners =  = myButton.mon({\n    destroyable: true\n    mouseover:   function() { console.log('mouseover'); },\n    mouseout:    function() { console.log('mouseout'); },\n    click:       function() { console.log('click'); }\n});\n
    \n\n\n\n\n

    And when those listeners need to be removed:

    \n\n\n\n\n
    Ext.destroy(this.btnListeners);\n
    \n\n\n\n\n

    or

    \n\n\n\n\n
    this.btnListeners.destroy();\n
    \n\n
( item, ename, [fn], [scope] )
Shorthand for removeManagedListener. ...

Shorthand for removeManagedListener.

\n\n

Removes listeners that were added by the mon method.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item from which to remove a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
( eventName, [fn], [scope], [options] ) : Object
Shorthand for addListener. ...

Shorthand for addListener.

\n\n

Appends an event handler to this object. For example:

\n\n
myGridPanel.on(\"mouseover\", this.onMouseOver, this);\n
\n\n

The method also allows for a single argument to be passed which is a config object\ncontaining properties which specify multiple events. For example:

\n\n
myGridPanel.on({\n    cellClick: this.onCellClick,\n    mouseover: this.onMouseOver,\n    mouseout: this.onMouseOut,\n    scope: this // Important. Ensure \"this\" is correct during handler execution\n});\n
\n\n

One can also specify options for each event handler separately:

\n\n
myGridPanel.on({\n    cellClick: {fn: this.onCellClick, scope: this, single: true},\n    mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n
\n\n

Names of methods in a specified scope may also be used. Note that\nscope MUST be specified to use this option:

\n\n
myGridPanel.on({\n    cellClick: {fn: 'onCellClick', scope: this, single: true},\n    mouseover: {fn: 'onMouseOver', scope: panel}\n});\n
\n

Parameters

  • eventName : String/Object

    The name of the event to listen for.\nMay also be an object who's property names are event names.

    \n\n
  • fn : Function (optional)

    The method the event invokes, or if scope is specified, the name* of the method within\nthe specified scope. Will be called with arguments\ngiven to fireEvent plus the options parameter described below.

    \n\n
  • scope : Object (optional)

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

    \n\n
  • options : Object (optional)

    An object containing handler configuration.

    \n\n\n\n\n

    Note: Unlike in ExtJS 3.x, the options object will also be passed as the last\nargument to every event handler.

    \n\n\n\n\n

    This object may contain any of the following properties:

    \n\n
    • scope : Object

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

      \n\n
    • delay : Number

      The number of milliseconds to delay the invocation of the handler after the event fires.

      \n\n
    • single : Boolean

      True to add a handler to handle just the next firing of the event, and then remove itself.

      \n\n
    • buffer : Number

      Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed\n by the specified number of milliseconds. If the event fires again within that time,\n the original handler is not invoked, but the new handler is scheduled in its place.

      \n\n
    • target : Ext.util.Observable

      Only call the handler if the event was fired on the target Observable, not if the event\n was bubbled up from a child Observable.

      \n\n
    • element : String

      This option is only valid for listeners bound to Components.\n The name of a Component property which references an element to add a listener to.

      \n\n\n\n\n

      This option is useful during Component construction to add DOM event listeners to elements of\n Components which will exist only after the Component is rendered.\n For example, to add a click listener to a Panel's body:

      \n\n\n\n\n
        new Ext.panel.Panel({\n      title: 'The title',\n      listeners: {\n          click: this.handlePanelClick,\n          element: 'body'\n      }\n  });\n
      \n\n
    • destroyable : Boolean (optional)

      When specified as true, the function returns A Destroyable object. An object which implements the destroy method which removes all listeners added in this call.

      \n\n

      Defaults to: false

    • priority : Number (optional)

      An optional numeric priority that determines the order in which event handlers\n are run. Event handlers with no priority will be run as if they had a priority\n of 0. Handlers with a higher priority will be prioritized to run sooner than\n those with a lower priority. Negative numbers can be used to set a priority\n lower than the default. Internally, the framework uses a range of 1000 or\n greater, and -1000 or lesser for handers that are intended to run before or\n after all others, so it is recommended to stay within the range of -999 to 999\n when setting the priority of event handlers in application-level code.

      \n\n\n\n\n

      Combining Options

      \n\n\n\n\n

      Using the options argument, it is possible to combine different types of listeners:

      \n\n\n\n\n

      A delayed, one-time listener.

      \n\n\n\n\n
      myPanel.on('hide', this.handleClick, this, {\n    single: true,\n    delay: 100\n});\n
      \n\n

Returns

  • Object

    Only when the destroyable option is specified.

    \n\n\n\n\n

    A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example:

    \n\n\n\n\n
    this.btnListeners =  = myButton.on({\n    destroyable: true\n    mouseover:   function() { console.log('mouseover'); },\n    mouseout:    function() { console.log('mouseout'); },\n    click:       function() { console.log('click'); }\n});\n
    \n\n\n\n\n

    And when those listeners need to be removed:

    \n\n\n\n\n
    Ext.destroy(this.btnListeners);\n
    \n\n\n\n\n

    or

    \n\n\n\n\n
    this.btnListeners.destroy();\n
    \n\n
( names, callback, scope )private
...
\n

Parameters

Ext.form.Basic
view source
( field )private
...
\n

Parameters

Ext.form.Basic
view source
( field )private
...
\n

Parameters

Ext.form.Basic
view source
( valid )private
Handle changes in the form's validity. ...

Handle changes in the form's validity. If there are any sub components with\nformBind=true then they are enabled/disabled based on the new validity.

\n

Parameters

Prepares a given class for observable instances. ...

Prepares a given class for observable instances. This method is called when a\nclass derives from this class or uses this class as a mixin.

\n

Parameters

  • T : Function

    The class constructor to prepare.

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

For example if you are extending Grid, you might decide to forward some events from store.\nSo you can do this inside your initComponent:

\n\n
this.relayEvents(this.getStore(), ['load']);\n
\n\n

The grid instance will then have an observable 'load' event which will be passed the\nparameters of the store's load event and any function fired with the grid's load event\nwould have access to the grid using the this keyword.

\n

Parameters

  • origin : Object

    The Observable whose events this object is to relay.

    \n
  • events : String[]

    Array of event names to relay.

    \n
  • prefix : String (optional)

    A common prefix to prepend to the event names. For example:

    \n\n
    this.relayEvents(this.getStore(), ['load', 'clear'], 'store');\n
    \n\n

    Now the grid will forward 'load' and 'clear' events of store as 'storeload' and 'storeclear'.

    \n

Returns

  • Object

    A Destroyable object. An object which implements the destroy method which, when destroyed, removes all relayers. For example:

    \n\n
    this.storeRelayers = this.relayEvents(this.getStore(), ['load', 'clear'], 'store');\n
    \n\n

    Can be undone by calling

    \n\n
    Ext.destroy(this.storeRelayers);\n
    \n\n

    or

    \n\n
    this.store.relayers.destroy();\n
    \n
Removes an event handler. ...

Removes an event handler.

\n

Parameters

  • eventName : String

    The type of event the handler was associated with.

    \n\n
  • fn : Function

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

    \n\n
  • scope : Object (optional)

    The scope originally specified for the handler. It must be the same as the\nscope argument specified in the original call to addListener or the listener will not be removed.

    \n\n
Removes listeners that were added by the mon method. ...

Removes listeners that were added by the mon method.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item from which to remove a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
Remove a single managed listener item ...

Remove a single managed listener item

\n

Parameters

  • isClear : Boolean

    True if this is being called during a clear

    \n
  • managedListener : Object

    The managed listener item\nSee removeManagedListener for other args

    \n
Ext.form.Basic
view source
( [resetRecord] ) : Ext.form.Basicchainable
Resets all fields in this form. ...

Resets all fields in this form. By default, any record bound by loadRecord\nwill be retained.

\n

Parameters

  • resetRecord : Boolean (optional)

    True to unbind any record set\nby loadRecord

    \n

    Defaults to: false

Returns

Resumes firing of the named event(s). ...

Resumes firing of the named event(s).

\n\n

After calling this method to resume events, the events will fire when requested to fire.

\n\n

Note that if the suspendEvent method is called multiple times for a certain event,\nthis converse method will have to be called the same number of times for it to resume firing.

\n

Parameters

  • eventName : String...

    Multiple event names to resume.

    \n
Resumes firing events (see suspendEvents). ...

Resumes firing events (see suspendEvents).

\n\n

If events were suspended using the queueSuspended parameter, then all events fired\nduring event suspension will be sent to any listeners now.

\n
( config, applyIfNotSet ) : Ext.Basechainableprivate
...
\n

Parameters

Returns

Ext.form.Basic
view source
( values ) : Ext.form.Basicchainable
Set values for fields in this form in bulk. ...

Set values for fields in this form in bulk.

\n

Parameters

  • values : Object/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

Get the reference to the class from which this object was instantiated. ...

Get the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics() is scope-independent and it always returns the class from which it was called, regardless of what\nthis points to during run-time

\n\n
Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n
\n

Returns

Ext.form.Basic
view source
( options ) : Ext.form.Basicchainable
Shortcut to do a submit action. ...

Shortcut to do a submit action. This will use the\nAJAX submit action by default. If the standardSubmit config\nis enabled it will use a standard form element to submit, or if the api config is present\nit will use the Ext.direct.Direct submit action.

\n\n

The following code:

\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.Action.CLIENT_INVALID:\n                Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');\n                break;\n            case Ext.form.action.Action.CONNECT_FAILURE:\n                Ext.Msg.alert('Failure', 'Ajax communication failed');\n                break;\n            case Ext.form.action.Action.SERVER_INVALID:\n               Ext.Msg.alert('Failure', action.result.msg);\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

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

Parameters

  • options : Object

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

    \n

Returns

Suspends firing of the named event(s). ...

Suspends firing of the named event(s).

\n\n

After calling this method to suspend events, the events will no longer fire when requested to fire.

\n\n

Note that if this is called multiple times for a certain event, the converse method\nresumeEvent will have to be called the same number of times for it to resume firing.

\n

Parameters

  • eventName : String...

    Multiple event names to suspend.

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

Suspends 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, fn, [scope] )
Shorthand for removeListener. ...

Shorthand for removeListener.

\n\n

Removes an event handler.

\n

Parameters

  • eventName : String

    The type of event the handler was associated with.

    \n\n
  • fn : Function

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

    \n\n
  • scope : Object (optional)

    The scope originally specified for the handler. It must be the same as the\nscope argument specified in the original call to addListener or the listener will not be removed.

    \n\n
Ext.form.Basic
view source
( [record] ) : Ext.form.Basicchainable
Persists the values in this form into the passed Ext.data.Model object in a beginEdit/endEdit block. ...

Persists the values in this form into the passed Ext.data.Model object in a beginEdit/endEdit block.\nIf the record is not specified, it will attempt to update (if it exists) the record provided to loadRecord.

\n

Parameters

Returns

Defined By

Static Methods

( config )privatestatic
...
\n

Parameters

( members )chainableprivatestatic
...
\n

Parameters

( name, member )chainableprivatestatic
...
\n

Parameters

( members )chainablestatic
Add methods / properties to the prototype of this class. ...

Add methods / properties to the prototype of this class.

\n\n
Ext.define('My.awesome.Cat', {\n    constructor: function() {\n        ...\n    }\n});\n\n My.awesome.Cat.addMembers({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\n

Parameters

( members ) : Ext.Basechainablestatic
Add / override static properties of this class. ...

Add / override static properties of this class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.addStatics({\n    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'\n    method1: function() { ... },    // My.cool.Class.method1 = function() { ... };\n    method2: function() { ... }     // My.cool.Class.method2 = function() { ... };\n});\n
\n

Parameters

Returns

( xtype )chainableprivatestatic
...
\n

Parameters

( fromClass, members ) : Ext.Basechainableprivatestatic
Borrow another class' members to the prototype of this class. ...

Borrow another class' members to the prototype of this class.

\n\n
Ext.define('Bank', {\n    money: '$$$',\n    printMoney: function() {\n        alert('$$$$$$$');\n    }\n});\n\nExt.define('Thief', {\n    ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n
\n

Parameters

  • fromClass : Ext.Base

    The class to borrow members from

    \n
  • members : Array/String

    The names of the members to borrow

    \n

Returns

Create a new instance of this Class. ...

Create a new instance of this Class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n
\n\n

All parameters are passed to the constructor of the class.

\n

Returns

( alias, origin )static
Create aliases for existing prototype methods. ...

Create aliases for existing prototype methods. Example:

\n\n
Ext.define('My.cool.Class', {\n    method1: function() { ... },\n    method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n    method3: 'method1',\n    method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n
\n

Parameters

( config )privatestatic
...
\n

Parameters

Get the current class' name in string format. ...

Get the current class' name in string format.

\n\n
Ext.define('My.cool.Class', {\n    constructor: function() {\n        alert(this.self.getName()); // alerts 'My.cool.Class'\n    }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n
\n

Returns

( )deprecatedstatic
Adds members to class. ...

Adds members to class.

\n
\n

This method has been deprecated since 4.1

\n

Use addMembers instead.

\n\n
\n
( name, mixinClass )privatestatic
Used internally by the mixins pre-processor ...

Used internally by the mixins pre-processor

\n

Parameters

( fn, scope )chainableprivatestatic
...
\n

Parameters

( members ) : Ext.Basechainabledeprecatedstatic
Override members of this class. ...

Override members of this class. Overridden methods can be invoked via\ncallParent.

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callParent(arguments);\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n\n

As of 4.1, direct use of this method is deprecated. Use Ext.define\ninstead:

\n\n
Ext.define('My.CatOverride', {\n    override: 'My.Cat',\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callParent(arguments);\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n
\n\n

The above accomplishes the same result but can be managed by the Ext.Loader\nwhich can properly order the override and its target class and the build process\ncan determine whether the override is needed based on the required state of the\ntarget class (My.Cat).

\n
\n

This method has been deprecated since 4.1.0

\n

Use Ext.define instead

\n\n
\n

Parameters

  • members : Object

    The properties to add to this class. This should be\nspecified as an object literal containing one or more properties.

    \n

Returns

Defined By

Events

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

Fires when an action is completed.

\n

Parameters

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

Fires when an action fails.

\n

Parameters

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

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

\n

Parameters

Ext.form.Basic
view source
( this, dirty, eOpts )
Fires when the dirty state of the entire form changes. ...

Fires when the dirty state of the entire form changes.

\n

Parameters

Ext.form.Basic
view source
( this, valid, eOpts )
Fires when the validity of the entire form changes. ...

Fires when the validity of the entire form changes.

\n

Parameters

","superclasses":["Ext.Base","Ext.util.Observable"],"meta":{"docauthor":["Jason Johnston "]},"code_type":"ext_define","requires":["Ext.data.Errors","Ext.form.action.Load","Ext.form.action.Submit","Ext.util.DelayedTask","Ext.util.MixedCollection","Ext.window.MessageBox"],"html_meta":{"docauthor":null},"statics":{"property":[{"tagname":"property","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"$onExtended","id":"static-property-S-onExtended"}],"cfg":[],"css_var":[],"method":[{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"addConfig","id":"static-method-addConfig"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"addInheritableStatics","id":"static-method-addInheritableStatics"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"addMember","id":"static-method-addMember"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true},"name":"addMembers","id":"static-method-addMembers"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true},"name":"addStatics","id":"static-method-addStatics"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"addXtype","id":"static-method-addXtype"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"borrow","id":"static-method-borrow"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true},"name":"create","id":"static-method-create"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true},"name":"createAlias","id":"static-method-createAlias"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"extend","id":"static-method-extend"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true},"name":"getName","id":"static-method-getName"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"deprecated":{"text":"Use {@link #addMembers} instead.","version":"4.1"}},"name":"implement","id":"static-method-implement"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"mixin","id":"static-method-mixin"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"onExtended","id":"static-method-onExtended"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"markdown":true,"deprecated":{"text":"Use {@link Ext#define Ext.define} instead","version":"4.1.0"}},"name":"override","id":"static-method-override"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"triggerExtended","id":"static-method-triggerExtended"}],"event":[],"css_mixin":[]},"files":[{"href":"Basic.html#Ext-form-Basic","filename":"Basic.js"}],"linenr":1,"members":{"property":[{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"$className","id":"property-S-className"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"configMap","id":"property-configMap"},{"tagname":"property","owner":"Ext.util.Observable","meta":{"private":true},"name":"eventsSuspended","id":"property-eventsSuspended"},{"tagname":"property","owner":"Ext.util.Observable","meta":{"readonly":true},"name":"hasListeners","id":"property-hasListeners"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"initConfigList","id":"property-initConfigList"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"initConfigMap","id":"property-initConfigMap"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"isInstance","id":"property-isInstance"},{"tagname":"property","owner":"Ext.util.Observable","meta":{},"name":"isObservable","id":"property-isObservable"},{"tagname":"property","owner":"Ext.form.Basic","meta":{},"name":"owner","id":"property-owner"},{"tagname":"property","owner":"Ext.Base","meta":{"protected":true},"name":"self","id":"property-self"},{"tagname":"property","owner":"Ext.form.Basic","meta":{"private":true},"name":"wasDirty","id":"property-wasDirty"}],"cfg":[{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"api","id":"cfg-api"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"baseParams","id":"cfg-baseParams"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"errorReader","id":"cfg-errorReader"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"jsonSubmit","id":"cfg-jsonSubmit"},{"tagname":"cfg","owner":"Ext.util.Observable","meta":{},"name":"listeners","id":"cfg-listeners"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"method","id":"cfg-method"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"paramOrder","id":"cfg-paramOrder"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"paramsAsHash","id":"cfg-paramsAsHash"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"reader","id":"cfg-reader"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"standardSubmit","id":"cfg-standardSubmit"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"timeout","id":"cfg-timeout"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"trackResetOnLoad","id":"cfg-trackResetOnLoad"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"url","id":"cfg-url"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"waitMsgTarget","id":"cfg-waitMsgTarget"},{"tagname":"cfg","owner":"Ext.form.Basic","meta":{},"name":"waitTitle","id":"cfg-waitTitle"}],"css_var":[],"method":[{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"constructor","id":"method-constructor"},{"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.util.Observable","meta":{},"name":"addManagedListener","id":"method-addManagedListener"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"afterAction","id":"method-afterAction"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"applyIfToFields","id":"method-applyIfToFields"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"applyToFields","id":"method-applyToFields"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"beforeAction","id":"method-beforeAction"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true,"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."}},"name":"callOverridden","id":"method-callOverridden"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true},"name":"callParent","id":"method-callParent"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true},"name":"callSuper","id":"method-callSuper"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"captureArgs","id":"method-captureArgs"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"checkDirty","id":"method-checkDirty"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"checkDirtyDelay","id":"method-checkDirtyDelay"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"checkValidity","id":"method-checkValidity"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"checkValidityDelay","id":"method-checkValidityDelay"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"clearInvalid","id":"method-clearInvalid"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"clearListeners","id":"method-clearListeners"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"clearManagedListeners","id":"method-clearManagedListeners"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"configClass","id":"method-configClass"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"continueFireEvent","id":"method-continueFireEvent"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"createRelayer","id":"method-createRelayer"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"destroy","id":"method-destroy"},{"tagname":"method","owner":"Ext.form.Basic","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.Basic","meta":{},"name":"findField","id":"method-findField"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"fireEvent","id":"method-fireEvent"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"fireEventArgs","id":"method-fireEventArgs"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"getBoundItems","id":"method-getBoundItems"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"getBubbleParent","id":"method-getBubbleParent"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"getConfig","id":"method-getConfig"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"getFieldValues","id":"method-getFieldValues"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"getFields","id":"method-getFields"},{"tagname":"method","owner":"Ext.Base","meta":{},"name":"getInitialConfig","id":"method-getInitialConfig"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"getRecord","id":"method-getRecord"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"getValues","id":"method-getValues"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"hasConfig","id":"method-hasConfig"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"hasInvalidField","id":"method-hasInvalidField"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"hasListener","id":"method-hasListener"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"hasUpload","id":"method-hasUpload"},{"tagname":"method","owner":"Ext.Base","meta":{"chainable":true,"protected":true},"name":"initConfig","id":"method-initConfig"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"initialize","id":"method-initialize"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"isDirty","id":"method-isDirty"},{"tagname":"method","owner":"Ext.form.Basic","meta":{},"name":"isValid","id":"method-isValid"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"load","id":"method-load"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"loadRecord","id":"method-loadRecord"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"markInvalid","id":"method-markInvalid"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"mon","id":"method-mon"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"mun","id":"method-mun"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"on","id":"method-on"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"onConfigUpdate","id":"method-onConfigUpdate"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"onFieldAdd","id":"method-onFieldAdd"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"onFieldRemove","id":"method-onFieldRemove"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"private":true},"name":"onValidityChange","id":"method-onValidityChange"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"prepareClass","id":"method-prepareClass"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"relayEvents","id":"method-relayEvents"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"removeListener","id":"method-removeListener"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"removeManagedListener","id":"method-removeManagedListener"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"removeManagedListenerItem","id":"method-removeManagedListenerItem"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"reset","id":"method-reset"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"resumeEvent","id":"method-resumeEvent"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"resumeEvents","id":"method-resumeEvents"},{"tagname":"method","owner":"Ext.Base","meta":{"chainable":true,"private":true},"name":"setConfig","id":"method-setConfig"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"setValues","id":"method-setValues"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true},"name":"statics","id":"method-statics"},{"tagname":"method","owner":"Ext.form.Basic","meta":{"chainable":true},"name":"submit","id":"method-submit"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"suspendEvent","id":"method-suspendEvent"},{"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.Basic","meta":{"chainable":true},"name":"updateRecord","id":"method-updateRecord"}],"event":[{"tagname":"event","owner":"Ext.form.Basic","meta":{},"name":"actioncomplete","id":"event-actioncomplete"},{"tagname":"event","owner":"Ext.form.Basic","meta":{},"name":"actionfailed","id":"event-actionfailed"},{"tagname":"event","owner":"Ext.form.Basic","meta":{},"name":"beforeaction","id":"event-beforeaction"},{"tagname":"event","owner":"Ext.form.Basic","meta":{},"name":"dirtychange","id":"event-dirtychange"},{"tagname":"event","owner":"Ext.form.Basic","meta":{},"name":"validitychange","id":"event-validitychange"}],"css_mixin":[]},"inheritable":null,"private":null,"component":false,"name":"Ext.form.Basic","singleton":false,"override":null,"inheritdoc":null,"id":"class-Ext.form.Basic","mixins":[],"mixedInto":[]});