X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..refs/heads/master:/docs/source/Action2.html diff --git a/docs/source/Action2.html b/docs/source/Action2.html index 3ff74b38..f56c117c 100644 --- a/docs/source/Action2.html +++ b/docs/source/Action2.html @@ -1,5 +1,22 @@ -
+ +/** - * @class Ext.form.action.Action + + + + +\ No newline at end of file +The source code + + + + + + +/** + * @class Ext.form.action.Action * @extends Ext.Base * <p>The subclasses of this class provide actions to perform upon {@link Ext.form.Basic Form}s.</p> * <p>Instances of this class are only created by a {@link Ext.form.Basic Form} when @@ -11,54 +28,52 @@ * {@link Ext.form.Basic#load load} and {@link Ext.form.Basic#doAction doAction}), * and to the {@link Ext.form.Basic#actioncomplete actioncomplete} and * {@link Ext.form.Basic#actionfailed actionfailed} event handlers.</p> - * @constructor - * @param {Object} config The configuration for this instance. */ Ext.define('Ext.form.action.Action', { alternateClassName: 'Ext.form.Action', - /** + /** * @cfg {Ext.form.Basic} form The {@link Ext.form.Basic BasicForm} instance that * is invoking this Action. Required. */ - /** + /** * @cfg {String} url The URL that the Action is to invoke. Will default to the {@link Ext.form.Basic#url url} * configured on the {@link #form}. */ - /** + /** * @cfg {Boolean} reset When set to <tt><b>true</b></tt>, causes the Form to be * {@link Ext.form.Basic#reset reset} on Action success. If specified, this happens * before the {@link #success} callback is called and before the Form's * {@link Ext.form.Basic#actioncomplete actioncomplete} event fires. */ - /** + /** * @cfg {String} method The HTTP method to use to access the requested URL. Defaults to the * {@link Ext.form.Basic#method BasicForm's method}, or 'POST' if not specified. */ - /** + /** * @cfg {Object/String} params <p>Extra parameter values to pass. These are added to the Form's * {@link Ext.form.Basic#baseParams} and passed to the specified URL along with the Form's * input fields.</p> * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode Ext.Object.toQueryString}.</p> */ - /** + /** * @cfg {Object} headers <p>Extra headers to be sent in the AJAX request for submit and load actions. See - * {@link Ext.data.Connection#headers}.</p> + * {@link Ext.data.proxy.Ajax#headers}.</p> */ - /** + /** * @cfg {Number} timeout The number of seconds to wait for a server response before * failing with the {@link #failureType} as {@link Ext.form.action.Action#CONNECT_FAILURE}. If not specified, * defaults to the configured <tt>{@link Ext.form.Basic#timeout timeout}</tt> of the * {@link #form}. */ - /** + /** * @cfg {Function} success The function to call when a valid success return packet is received. * The function is passed the following parameters:<ul class="mdetail-params"> * <li><b>form</b> : Ext.form.Basic<div class="sub-desc">The form that requested the action</div></li> @@ -67,7 +82,7 @@ Ext.define('Ext.form.action.Action', { * </ul> */ - /** + /** * @cfg {Function} failure The function to call when a failure packet was received, or when an * error ocurred in the Ajax communication. * The function is passed the following parameters:<ul class="mdetail-params"> @@ -78,34 +93,34 @@ Ext.define('Ext.form.action.Action', { * </ul> */ - /** + /** * @cfg {Object} scope The scope in which to call the configured <tt>success</tt> and <tt>failure</tt> * callback functions (the <tt>this</tt> reference for the callback functions). */ - /** + /** * @cfg {String} waitMsg The message to be displayed by a call to {@link Ext.window.MessageBox#wait} * during the time the action is being processed. */ - /** + /** * @cfg {String} waitTitle The title to be displayed by a call to {@link Ext.window.MessageBox#wait} * during the time the action is being processed. */ - /** + /** * @cfg {Boolean} submitEmptyText If set to <tt>true</tt>, the emptyText value will be sent with the form * when it is submitted. Defaults to <tt>true</tt>. */ - - /** + submitEmptyText : true, + /** * @property type * The type of action this Action instance performs. * Currently only "submit" and "load" are supported. * @type {String} */ - /** + /** * The type of failure detected will be one of these: {@link Ext.form.action.Action#CLIENT_INVALID}, * {@link Ext.form.action.Action#SERVER_INVALID}, {@link Ext.form.action.Action#CONNECT_FAILURE}, or * {@link Ext.form.action.Action#LOAD_FAILURE}. Usage: @@ -149,21 +164,23 @@ buttons: [{ * @type {String} */ - /** + /** * The raw XMLHttpRequest object used to perform the action. * @property response * @type {Object} */ - /** + /** * The decoded response object containing a boolean <tt>success</tt> property and * other, action-specific properties. * @property result * @type {Object} */ - - + /** + * Creates new Action. + * @param {Object} config (optional) Config object. + */ constructor: function(config) { if (config) { Ext.apply(this, config); @@ -176,26 +193,26 @@ buttons: [{ } }, - /** + /** * Invokes this action using the current configuration. */ run: Ext.emptyFn, - /** + /** * @private * @method onSuccess * Callback method that gets invoked when the action completes successfully. Must be implemented by subclasses. * @param {Object} response */ - /** + /** * @private * @method handleResponse * Handles the raw response and builds a result object from it. Must be implemented by subclasses. * @param {Object} response */ - /** + /** * @private * Handles a failure response. * @param {Object} response @@ -206,7 +223,7 @@ buttons: [{ this.form.afterAction(this, false); }, - /** + /** * @private * Validates that a response contains either responseText or responseXML and invokes * {@link #handleResponse} to build the result object. @@ -222,7 +239,7 @@ buttons: [{ return (this.result = this.handleResponse(response)); }, - /** + /** * @private * Build the URL for the AJAX request. Used by the standard AJAX submit and load actions. * @return {String} The URL. @@ -231,7 +248,7 @@ buttons: [{ return this.url || this.form.url; }, - /** + /** * @private * Determine the HTTP method to be used for the request. * @return {String} The HTTP method @@ -240,7 +257,7 @@ buttons: [{ return (this.method || this.form.method || 'POST').toUpperCase(); }, - /** + /** * @private * Get the set of parameters specified in the BasicForm's baseParams and/or the params option. * Items in params override items of the same name in baseParams. @@ -250,7 +267,7 @@ buttons: [{ return Ext.apply({}, this.params, this.form.baseParams); }, - /** + /** * @private * Creates a callback object. */ @@ -268,7 +285,7 @@ buttons: [{ }, statics: { - /** + /** * @property CLIENT_INVALID * Failure type returned when client side validation of the Form fails * thus aborting a submit action. Client side validation is performed unless @@ -278,7 +295,7 @@ buttons: [{ */ CLIENT_INVALID: 'client', - /** + /** * @property SERVER_INVALID * <p>Failure type returned when server side processing fails and the {@link #result}'s * <tt>success</tt> property is set to <tt>false</tt>.</p> @@ -289,7 +306,7 @@ buttons: [{ */ SERVER_INVALID: 'server', - /** + /** * @property CONNECT_FAILURE * Failure type returned when a communication error happens when attempting * to send a request to the remote server. The {@link #response} may be examined to @@ -299,7 +316,7 @@ buttons: [{ */ CONNECT_FAILURE: 'connect', - /** + /** * @property LOAD_FAILURE * Failure type returned when the response's <tt>success</tt> * property is set to <tt>false</tt>, or no field values are returned in the response's @@ -312,4 +329,6 @@ buttons: [{ } }); -