X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..HEAD:/docs/output/Ext.form.action.DirectSubmit.js?ds=sidebyside diff --git a/docs/output/Ext.form.action.DirectSubmit.js b/docs/output/Ext.form.action.DirectSubmit.js index 0f1c0e76..cb439bd4 100644 --- a/docs/output/Ext.form.action.DirectSubmit.js +++ b/docs/output/Ext.form.action.DirectSubmit.js @@ -1,502 +1 @@ -Ext.data.JsonP.Ext_form_action_DirectSubmit({ - "tagname": "class", - "name": "Ext.form.action.DirectSubmit", - "doc": "

Provides Ext.direct support for submitting form data.

\n\n\n

This example illustrates usage of Ext.direct.Direct to submit a form through Ext.Direct.

\n\n\n
var myFormPanel = new Ext.form.Panel({\n    // configs for FormPanel\n    title: 'Basic Information',\n    renderTo: document.body,\n    width: 300, height: 160,\n    padding: 10,\n    buttons:[{\n        text: 'Submit',\n        handler: function(){\n            myFormPanel.getForm().submit({\n                params: {\n                    foo: 'bar',\n                    uid: 34\n                }\n            });\n        }\n    }],\n\n    // configs apply to child items\n    defaults: {anchor: '100%'},\n    defaultType: 'textfield',\n    items: [{\n        fieldLabel: 'Name',\n        name: 'name'\n    },{\n        fieldLabel: 'Email',\n        name: 'email'\n    },{\n        fieldLabel: 'Company',\n        name: 'company'\n    }],\n\n    // configs for BasicForm\n    api: {\n        // The server-side method to call for load() requests\n        load: Profile.getBasicInfo,\n        // The server-side must mark the submit handler as a 'formHandler'\n        submit: Profile.updateBasicInfo\n    },\n    // specify the order for the passed params\n    paramOrder: ['uid', 'foo']\n});\n
\n\n\n

The data packet sent to the server will resemble something like:

\n\n
{\n    \"action\":\"Profile\",\"method\":\"updateBasicInfo\",\"type\":\"rpc\",\"tid\":\"6\",\n    \"result\":{\n        \"success\":true,\n        \"id\":{\n            \"extAction\":\"Profile\",\"extMethod\":\"updateBasicInfo\",\n            \"extType\":\"rpc\",\"extTID\":\"6\",\"extUpload\":\"false\",\n            \"name\":\"Aaron Conran\",\"email\":\"aaron@sencha.com\",\"company\":\"Sencha Inc.\"\n        }\n    }\n}\n
\n\n\n

The form will process a data packet returned by the server that is similar\nto the following:

\n\n
// sample success packet (batched requests)\n[\n    {\n        \"action\":\"Profile\",\"method\":\"updateBasicInfo\",\"type\":\"rpc\",\"tid\":3,\n        \"result\":{\n            \"success\":true\n        }\n    }\n]\n\n// sample failure packet (one request)\n{\n        \"action\":\"Profile\",\"method\":\"updateBasicInfo\",\"type\":\"rpc\",\"tid\":\"6\",\n        \"result\":{\n            \"errors\":{\n                \"email\":\"already taken\"\n            },\n            \"success\":false,\n            \"foo\":\"bar\"\n        }\n}\n
\n\n\n

Also see the discussion in Ext.form.action.DirectLoad.

\n", - "extends": "Ext.form.action.Submit", - "mixins": [ - - ], - "alternateClassNames": [ - "Ext.form.Action.DirectSubmit" - ], - "xtype": null, - "author": null, - "docauthor": null, - "singleton": false, - "private": false, - "cfg": [ - { - "tagname": "cfg", - "name": "clientValidation", - "member": "Ext.form.action.Submit", - "type": "boolean", - "doc": "

Determines whether a Form's fields are validated\nin a final call to isValid prior to submission.\nPass false in the Form's submit options to prevent this. Defaults to true.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Submit.js", - "linenr": 64, - "html_filename": "Submit.html", - "href": "Submit.html#Ext-form-action-Submit-cfg-clientValidation", - "shortDoc": "Determines whether a Form's fields are validated\nin a final call to isValid prior to submission.\nPass false in the Fo..." - }, - { - "tagname": "cfg", - "name": "failure", - "member": "Ext.form.action.Action", - "type": "Function", - "doc": "

The function to call when a failure packet was received, or when an\nerror ocurred in the Ajax communication.\nThe function is passed the following parameters:

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 70, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-failure", - "shortDoc": "The function to call when a failure packet was received, or when an\nerror ocurred in the Ajax communication.\nThe func..." - }, - { - "tagname": "cfg", - "name": "form", - "member": "Ext.form.action.Action", - "type": "Ext.form.Basic", - "doc": "

The BasicForm instance that\nis invoking this Action. Required.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 20, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-form" - }, - { - "tagname": "cfg", - "name": "headers", - "member": "Ext.form.action.Action", - "type": "Object", - "doc": "

Extra headers to be sent in the AJAX request for submit and load actions. See\nExt.data.Connection.headers.

\n\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 49, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-headers" - }, - { - "tagname": "cfg", - "name": "method", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

The HTTP method to use to access the requested URL. Defaults to the\nBasicForm's method, or 'POST' if not specified.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 37, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-method" - }, - { - "tagname": "cfg", - "name": "params", - "member": "Ext.form.action.Action", - "type": "Object/String", - "doc": "

Extra parameter values to pass. These are added to the Form's\nExt.form.Basic.baseParams and passed to the specified URL along with the Form's\ninput fields.

\n\n\n

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

\n\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 42, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-params", - "shortDoc": "Extra parameter values to pass. These are added to the Form's\nExt.form.Basic.baseParams and passed to the specified U..." - }, - { - "tagname": "cfg", - "name": "reset", - "member": "Ext.form.action.Action", - "type": "Boolean", - "doc": "

When set to true, causes the Form to be\nreset on Action success. If specified, this happens\nbefore the success callback is called and before the Form's\nactioncomplete event fires.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 30, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-reset", - "shortDoc": "When set to true, causes the Form to be\nreset on Action success. If specified, this happens\nbefore the success callba..." - }, - { - "tagname": "cfg", - "name": "scope", - "member": "Ext.form.action.Action", - "type": "Object", - "doc": "

The scope in which to call the configured success and failure\ncallback functions (the this reference for the callback functions).

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 81, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-scope", - "shortDoc": "The scope in which to call the configured success and failure\ncallback functions (the this reference for the callback..." - }, - { - "tagname": "cfg", - "name": "submitEmptyText", - "member": "Ext.form.action.Action", - "type": "Boolean", - "doc": "

If set to true, the emptyText value will be sent with the form\nwhen it is submitted. Defaults to true.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 96, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-submitEmptyText" - }, - { - "tagname": "cfg", - "name": "success", - "member": "Ext.form.action.Action", - "type": "Function", - "doc": "

The function to call when a valid success return packet is received.\nThe function is passed the following parameters:

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 61, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-success", - "shortDoc": "The function to call when a valid success return packet is received.\nThe function is passed the following parameters:..." - }, - { - "tagname": "cfg", - "name": "timeout", - "member": "Ext.form.action.Action", - "type": "Number", - "doc": "

The number of seconds to wait for a server response before\nfailing with the failureType as Ext.form.action.Action.CONNECT_FAILURE. If not specified,\ndefaults to the configured timeout of the\nform.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 54, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-timeout", - "shortDoc": "The number of seconds to wait for a server response before\nfailing with the failureType as Ext.form.action.Action.CON..." - }, - { - "tagname": "cfg", - "name": "url", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

The URL that the Action is to invoke. Will default to the url\nconfigured on the form.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 25, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-url" - }, - { - "tagname": "cfg", - "name": "waitMsg", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

The message to be displayed by a call to Ext.window.MessageBox.wait\nduring the time the action is being processed.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 86, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-waitMsg" - }, - { - "tagname": "cfg", - "name": "waitTitle", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

The title to be displayed by a call to Ext.window.MessageBox.wait\nduring the time the action is being processed.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 91, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-cfg-waitTitle" - } - ], - "method": [ - { - "tagname": "method", - "name": "DirectSubmit", - "member": "Ext.form.action.Action", - "doc": "\n", - "params": [ - { - "type": "Object", - "name": "config", - "doc": "

The configuration for this instance.

\n", - "optional": false - } - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 1, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-method-constructor", - "shortDoc": "\n" - }, - { - "tagname": "method", - "name": "callOverridden", - "member": "Ext.Base", - "doc": "

Call the original method that was previously overridden with Ext.Base.override

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\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", - "params": [ - { - "type": "Array/Arguments", - "name": "args", - "doc": "

The arguments, either an array or the arguments object

\n", - "optional": false - } - ], - "return": { - "type": "Mixed", - "doc": "

Returns the result after calling the overridden method

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 279, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-method-callOverridden", - "shortDoc": "Call the original method that was previously overridden with Ext.Base.override\n\nExt.define('My.Cat', {\n constructo..." - }, - { - "tagname": "method", - "name": "getName", - "member": "Ext.Base", - "doc": "

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", - "params": [ - - ], - "return": { - "type": "String", - "doc": "

className

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 652, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-method-getName", - "shortDoc": "Get the current class' name in string format.\n\nExt.define('My.cool.Class', {\n constructor: function() {\n al..." - } - ], - "property": [ - { - "tagname": "property", - "name": "CLIENT_INVALID", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

Failure type returned when client side validation of the Form fails\nthus aborting a submit action. Client side validation is performed unless\nExt.form.action.Submit.clientValidation is explicitly set to false.

\n", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 271, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-CLIENT_INVALID", - "shortDoc": "Failure type returned when client side validation of the Form fails\nthus aborting a submit action. Client side valida..." - }, - { - "tagname": "property", - "name": "CONNECT_FAILURE", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

Failure type returned when a communication error happens when attempting\nto send a request to the remote server. The response may be examined to\nprovide further information.

\n", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 292, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-CONNECT_FAILURE", - "shortDoc": "Failure type returned when a communication error happens when attempting\nto send a request to the remote server. The ..." - }, - { - "tagname": "property", - "name": "LOAD_FAILURE", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

Failure type returned when the response's success\nproperty is set to false, or no field values are returned in the response's\ndata property.

\n", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 302, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-LOAD_FAILURE", - "shortDoc": "Failure type returned when the response's success\nproperty is set to false, or no field values are returned in the re..." - }, - { - "tagname": "property", - "name": "SERVER_INVALID", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

Failure type returned when server side processing fails and the result's\nsuccess property is set to false.

\n\n\n

In the case of a form submission, field-specific error messages may be returned in the\nresult's errors property.

\n\n", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 281, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-SERVER_INVALID", - "shortDoc": "Failure type returned when server side processing fails and the result's\nsuccess property is set to false.\n\n\nIn the c..." - }, - { - "tagname": "property", - "name": "addStatics", - "member": "Ext.Base", - "type": "Function", - "doc": "

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", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 399, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-property-addStatics", - "shortDoc": "Add / override static properties of this class.\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.addStatics(..." - }, - { - "tagname": "property", - "name": "borrow", - "member": "Ext.Base", - "type": "Function", - "doc": "

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", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 492, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-property-borrow", - "shortDoc": "Borrow another class' members to the prototype of this class.\n\nExt.define('Bank', {\n money: '$$$',\n printMoney:..." - }, - { - "tagname": "property", - "name": "create", - "member": "Ext.Base", - "type": "Function", - "doc": "

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", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 340, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-property-create", - "shortDoc": "Create a new instance of this Class.\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.create({\n someConfi..." - }, - { - "tagname": "property", - "name": "createAlias", - "member": "Ext.Base", - "type": "Function", - "doc": "

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", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 670, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-property-createAlias", - "shortDoc": "Create aliases for existing prototype methods. Example:\n\nExt.define('My.cool.Class', {\n method1: function() { ... ..." - }, - { - "tagname": "property", - "name": "failureType", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

The type of failure detected will be one of these: Ext.form.action.Action.CLIENT_INVALID,\nExt.form.action.Action.SERVER_INVALID, Ext.form.action.Action.CONNECT_FAILURE, or\nExt.form.action.Action.LOAD_FAILURE. Usage:

\n\n
var fp = new Ext.form.Panel({\n...\nbuttons: [{\n    text: 'Save',\n    formBind: true,\n    handler: function(){\n        if(fp.getForm().isValid()){\n            fp.getForm().submit({\n                url: 'form-submit.php',\n                waitMsg: 'Submitting your data...',\n                success: function(form, action){\n                    // server responded with success = true\n                    var result = action.result;\n                },\n                failure: function(form, action){\n                    if (action.failureType === Ext.form.action.Action.CONNECT_FAILURE) {\n                        Ext.Msg.alert('Error',\n                            'Status:'+action.response.status+': '+\n                            action.response.statusText);\n                    }\n                    if (action.failureType === Ext.form.action.Action.SERVER_INVALID){\n                        // server responded with success = false\n                        Ext.Msg.alert('Invalid', action.result.errormsg);\n                    }\n                }\n            });\n        }\n    }\n},{\n    text: 'Reset',\n    handler: function(){\n        fp.getForm().reset();\n    }\n}]\n
\n\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 108, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-failureType", - "shortDoc": "The type of failure detected will be one of these: Ext.form.action.Action.CLIENT_INVALID,\nExt.form.action.Action.SERV..." - }, - { - "tagname": "property", - "name": "implement", - "member": "Ext.Base", - "type": "Function", - "doc": "

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.implement({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\n", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 428, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-property-implement", - "shortDoc": "Add methods / properties to the prototype of this class.\n\nExt.define('My.awesome.Cat', {\n constructor: function() ..." - }, - { - "tagname": "property", - "name": "override", - "member": "Ext.Base", - "type": "Function", - "doc": "

Override prototype members of this class. Overridden methods can be invoked via\nExt.Base.callOverridden

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\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", - "private": false, - "static": true, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/Base.js", - "linenr": 536, - "html_filename": "Base3.html", - "href": "Base3.html#Ext-Base-property-override", - "shortDoc": "Override prototype members of this class. Overridden methods can be invoked via\nExt.Base.callOverridden\n\nExt.define('..." - }, - { - "tagname": "property", - "name": "response", - "member": "Ext.form.action.Action", - "type": "Object", - "doc": "

The raw XMLHttpRequest object used to perform the action.

\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 152, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-response" - }, - { - "tagname": "property", - "name": "result", - "member": "Ext.form.action.Action", - "type": "Object", - "doc": "

The decoded response object containing a boolean success property and\nother, action-specific properties.

\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 158, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-result" - }, - { - "tagname": "property", - "name": "run", - "member": "Ext.form.action.Action", - "type": "Object", - "doc": "

Invokes this action using the current configuration.

\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 179, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-run" - }, - { - "tagname": "property", - "name": "type", - "member": "Ext.form.action.Action", - "type": "String", - "doc": "

The type of action this Action instance performs.\nCurrently only \"submit\" and \"load\" are supported.

\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/Action.js", - "linenr": 101, - "html_filename": "Action2.html", - "href": "Action2.html#Ext-form-action-Action-property-type" - } - ], - "event": [ - - ], - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/action/DirectSubmit.js", - "linenr": 1, - "html_filename": "DirectSubmit.html", - "href": "DirectSubmit.html#Ext-form-action-DirectSubmit", - "cssVar": [ - - ], - "cssMixin": [ - - ], - "component": false, - "superclasses": [ - "Ext.Base", - "Ext.form.action.Action", - "Ext.form.action.Submit" - ], - "subclasses": [ - - ], - "mixedInto": [ - - ], - "allMixins": [ - - ] -}); \ No newline at end of file +Ext.data.JsonP.Ext_form_action_DirectSubmit({"tagname":"class","html":"

Alternate names

Ext.form.Action.DirectSubmit

Hierarchy

Requires

Files

Provides Ext.direct support for submitting form data.

\n\n\n

This example illustrates usage of Ext.direct.Direct to submit a form through Ext.Direct.

\n\n\n
var myFormPanel = new Ext.form.Panel({\n    // configs for FormPanel\n    title: 'Basic Information',\n    renderTo: document.body,\n    width: 300, height: 160,\n    padding: 10,\n    buttons:[{\n        text: 'Submit',\n        handler: function(){\n            myFormPanel.getForm().submit({\n                params: {\n                    foo: 'bar',\n                    uid: 34\n                }\n            });\n        }\n    }],\n\n    // configs apply to child items\n    defaults: {anchor: '100%'},\n    defaultType: 'textfield',\n    items: [{\n        fieldLabel: 'Name',\n        name: 'name'\n    },{\n        fieldLabel: 'Email',\n        name: 'email'\n    },{\n        fieldLabel: 'Company',\n        name: 'company'\n    }],\n\n    // configs for BasicForm\n    api: {\n        // The server-side method to call for load() requests\n        load: Profile.getBasicInfo,\n        // The server-side must mark the submit handler as a 'formHandler'\n        submit: Profile.updateBasicInfo\n    },\n    // specify the order for the passed params\n    paramOrder: ['uid', 'foo']\n});\n
\n\n\n

The data packet sent to the server will resemble something like:

\n\n
{\n    \"action\":\"Profile\",\"method\":\"updateBasicInfo\",\"type\":\"rpc\",\"tid\":\"6\",\n    \"result\":{\n        \"success\":true,\n        \"id\":{\n            \"extAction\":\"Profile\",\"extMethod\":\"updateBasicInfo\",\n            \"extType\":\"rpc\",\"extTID\":\"6\",\"extUpload\":\"false\",\n            \"name\":\"Aaron Conran\",\"email\":\"aaron@sencha.com\",\"company\":\"Sencha Inc.\"\n        }\n    }\n}\n
\n\n\n

The form will process a data packet returned by the server that is similar\nto the following:

\n\n
// sample success packet (batched requests)\n[\n    {\n        \"action\":\"Profile\",\"method\":\"updateBasicInfo\",\"type\":\"rpc\",\"tid\":3,\n        \"result\":{\n            \"success\":true\n        }\n    }\n]\n\n// sample failure packet (one request)\n{\n        \"action\":\"Profile\",\"method\":\"updateBasicInfo\",\"type\":\"rpc\",\"tid\":\"6\",\n        \"result\":{\n            \"errors\":{\n                \"email\":\"already taken\"\n            },\n            \"success\":false,\n            \"foo\":\"bar\"\n        }\n}\n
\n\n\n

Also see the discussion in Ext.form.action.DirectLoad.

\n
Defined By

Config options

Determines whether a Form's fields are validated\nin a final call to isValid prior to submission. ...

Determines whether a Form's fields are validated\nin a final call to isValid prior to submission.\nPass false in the Form's submit options to prevent this. Defaults to true.

\n
The function to call when a failure packet was received, or when an\nerror ocurred in the Ajax communication. ...

The function to call when a failure packet was received, or when an\nerror ocurred in the Ajax communication.\nThe function is passed the following parameters:

\n
The BasicForm instance that\nis invoking this Action. ...

The BasicForm instance that\nis invoking this Action. Required.

\n
Extra headers to be sent in the AJAX request for submit and load actions. ...

Extra headers to be sent in the AJAX request for submit and load actions. See\nExt.data.proxy.Ajax.headers.

\n\n
The HTTP method to use to access the requested URL. ...

The HTTP method to use to access the requested URL. Defaults to the\nBasicForm's method, or 'POST' if not specified.

\n
Extra parameter values to pass. ...

Extra parameter values to pass. These are added to the Form's\nExt.form.Basic.baseParams and passed to the specified URL along with the Form's\ninput fields.

\n\n\n

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

\n\n
When set to true, causes the Form to be\nreset on Action success. ...

When set to true, causes the Form to be\nreset on Action success. If specified, this happens\nbefore the success callback is called and before the Form's\nactioncomplete event fires.

\n
The scope in which to call the configured success and failure\ncallback functions (the this reference for the callback...

The scope in which to call the configured success and failure\ncallback functions (the this reference for the callback functions).

\n
If set to true, the emptyText value will be sent with the form\nwhen it is submitted. ...

If set to true, the emptyText value will be sent with the form\nwhen it is submitted. Defaults to true.

\n

Defaults to: true

The function to call when a valid success return packet is received. ...

The function to call when a valid success return packet is received.\nThe function is passed the following parameters:

\n
The number of seconds to wait for a server response before\nfailing with the failureType as CONNECT_FAILURE. ...

The number of seconds to wait for a server response before\nfailing with the failureType as CONNECT_FAILURE. If not specified,\ndefaults to the configured timeout of the\nform.

\n
The URL that the Action is to invoke. ...

The URL that the Action is to invoke. Will default to the url\nconfigured on the form.

\n
 

The message to be displayed by a call to Ext.window.MessageBox.wait\nduring the time the action is being processed.

\n

The message to be displayed by a call to Ext.window.MessageBox.wait\nduring the time the action is being processed.

\n
 

The title to be displayed by a call to Ext.window.MessageBox.wait\nduring the time the action is being processed.

\n

The title to be displayed by a call to Ext.window.MessageBox.wait\nduring the time the action is being processed.

\n
Defined By

Properties

The type of failure detected will be one of these: CLIENT_INVALID,\nSERVER_INVALID, CONNECT_FAILURE, or\nLOAD_FAILURE. ...

The type of failure detected will be one of these: CLIENT_INVALID,\nSERVER_INVALID, CONNECT_FAILURE, or\nLOAD_FAILURE. Usage:

\n\n
var fp = new Ext.form.Panel({\n...\nbuttons: [{\n    text: 'Save',\n    formBind: true,\n    handler: function(){\n        if(fp.getForm().isValid()){\n            fp.getForm().submit({\n                url: 'form-submit.php',\n                waitMsg: 'Submitting your data...',\n                success: function(form, action){\n                    // server responded with success = true\n                    var result = action.result;\n                },\n                failure: function(form, action){\n                    if (action.failureType === CONNECT_FAILURE) {\n                        Ext.Msg.alert('Error',\n                            'Status:'+action.response.status+': '+\n                            action.response.statusText);\n                    }\n                    if (action.failureType === SERVER_INVALID){\n                        // server responded with success = false\n                        Ext.Msg.alert('Invalid', action.result.errormsg);\n                    }\n                }\n            });\n        }\n    }\n},{\n    text: 'Reset',\n    handler: function(){\n        fp.getForm().reset();\n    }\n}]\n
\n\n
 

The raw XMLHttpRequest object used to perform the action.

\n

The raw XMLHttpRequest object used to perform the action.

\n
 

The decoded response object containing a boolean success property and\nother, action-specific properties.

\n

The decoded response object containing a boolean success property and\nother, action-specific properties.

\n
 

Invokes this action using the current configuration.

\n

Invokes this action using the current configuration.

\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        return 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
The type of action this Action instance performs. ...

The type of action this Action instance performs.\nCurrently only \"submit\" and \"load\" are supported.

\n

Methods

Defined By

Instance Methods

Creates new Action. ...

Creates new Action.

\n

Parameters

  • config : Object (optional)

    Config object.

    \n

Returns

( Array/Arguments args ) : Objectprotected
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        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\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

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object

    \n

Returns

  • Object

    Returns the result after calling the overridden method

    \n
( Array/Arguments args ) : Objectprotected
Call the parent's overridden method. ...

Call the parent's overridden method. For example:

\n\n
Ext.define('My.own.A', {\n    constructor: function(test) {\n        alert(test);\n    }\n});\n\nExt.define('My.own.B', {\n    extend: 'My.own.A',\n\n    constructor: function(test) {\n        alert(test);\n\n        this.callParent([test + 1]);\n    }\n});\n\nExt.define('My.own.C', {\n    extend: 'My.own.B',\n\n    constructor: function() {\n        alert(\"Going to call parent's overriden constructor...\");\n\n        this.callParent(arguments);\n    }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n                         // alerts '2', then alerts '3'\n
\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 from the superclass' method

    \n
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        return this;\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\n

Parameters

Returns

  • Object

    mixins The mixin prototypes as key - value pairs

    \n
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        return this;\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

Defined By

Static Methods

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

( Ext.Base fromClass, String/String[] members ) : Ext.Basestatic
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 : String/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

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

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

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.implement({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\n

Parameters

Override prototype members of this class. ...

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

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\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

Parameters

Returns

","allMixins":[],"meta":{},"requires":["Ext.direct.Manager"],"deprecated":null,"extends":"Ext.form.action.Submit","inheritable":false,"static":false,"superclasses":["Ext.Base","Ext.form.action.Action","Ext.form.action.Submit","Ext.form.action.DirectSubmit"],"singleton":false,"code_type":"ext_define","alias":null,"statics":{"property":[],"css_var":[],"css_mixin":[],"cfg":[],"method":[{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"addStatics","id":"static-method-addStatics"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"borrow","id":"static-method-borrow"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"create","id":"static-method-create"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"createAlias","id":"static-method-createAlias"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"getName","id":"static-method-getName"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"implement","id":"static-method-implement"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"override","id":"static-method-override"}],"event":[]},"subclasses":[],"uses":[],"protected":false,"mixins":[],"members":{"property":[{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":null,"protected":false,"name":"failureType","id":"property-failureType"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":null,"protected":false,"name":"response","id":"property-response"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":null,"protected":false,"name":"result","id":"property-result"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":null,"protected":false,"name":"run","id":"property-run"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.Base","template":null,"required":null,"protected":true,"name":"self","id":"property-self"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":null,"protected":false,"name":"type","id":"property-type"}],"css_var":[],"css_mixin":[],"cfg":[{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Submit","template":null,"required":false,"protected":false,"name":"clientValidation","id":"cfg-clientValidation"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"failure","id":"cfg-failure"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"form","id":"cfg-form"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"headers","id":"cfg-headers"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"method","id":"cfg-method"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"params","id":"cfg-params"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"reset","id":"cfg-reset"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"scope","id":"cfg-scope"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"submitEmptyText","id":"cfg-submitEmptyText"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"success","id":"cfg-success"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"timeout","id":"cfg-timeout"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"url","id":"cfg-url"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"waitMsg","id":"cfg-waitMsg"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":null,"required":false,"protected":false,"name":"waitTitle","id":"cfg-waitTitle"}],"method":[{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.form.action.Action","template":false,"required":null,"protected":false,"name":"constructor","id":"method-constructor"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"callOverridden","id":"method-callOverridden"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"callParent","id":"method-callParent"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"initConfig","id":"method-initConfig"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"statics","id":"method-statics"}],"event":[]},"private":false,"component":false,"name":"Ext.form.action.DirectSubmit","alternateClassNames":["Ext.form.Action.DirectSubmit"],"id":"class-Ext.form.action.DirectSubmit","mixedInto":[],"xtypes":{"formaction":["directsubmit"]},"files":[{"href":"DirectSubmit.html#Ext-form-action-DirectSubmit","filename":"DirectSubmit.js"}]}); \ No newline at end of file