Upgrade to ExtJS 3.2.1 - Released 04/27/2010
[extjs.git] / docs / output / Ext.form.Action.DirectLoad.html
index a9cae5f..fcc8024 100644 (file)
-<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.form.Action.DirectLoad-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.form.Action.DirectLoad-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.form.Action.DirectLoad-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.form.Action.DirectLoad-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.form.Action.DirectLoad"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.form.Action.html" ext:member="" ext:cls="Ext.form.Action">Action</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.form.Action.Load.html" ext:member="" ext:cls="Ext.form.Action.Load">Action.Load</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif">Action.DirectLoad</pre></div><h1>Class <a href="source/Action1.html#cls-Ext.form.Action.DirectLoad">Ext.form.Action.DirectLoad</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">Action.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Action1.html#cls-Ext.form.Action.DirectLoad">Action.DirectLoad</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.form.Action.Load.html" ext:cls="Ext.form.Action.Load" ext:member="">Action.Load</a></td></tr><tr><td class="hd-info"></td></tr></table><div class="description"><p>Provides Ext.direct support for loading form data.</p>\r
-<p>This example illustrates usage of Ext.Direct to <b>load</b> a form through Ext.Direct.</p>\r
-<pre><code><b>var</b> myFormPanel = <b>new</b> Ext.form.FormPanel({\r
-    <i>// configs <b>for</b> FormPanel\r</i>
-    title: <em>'Basic Information'</em>,\r
-    renderTo: document.body,\r
-    width: 300, height: 160,\r
-    padding: 10,\r
-\r
-    <i>// configs apply to child items\r</i>
-    defaults: {anchor: <em>'100%'</em>},\r
-    defaultType: <em>'textfield'</em>,\r
-    items: [{\r
-        fieldLabel: <em>'Name'</em>,\r
-        name: <em>'name'</em>\r
-    },{\r
-        fieldLabel: <em>'Email'</em>,\r
-        name: <em>'email'</em>\r
-    },{\r
-        fieldLabel: <em>'Company'</em>,\r
-        name: <em>'company'</em>\r
-    }],\r
-\r
-    <i>// configs <b>for</b> BasicForm\r</i>
-    api: {\r
-        <i>// The server-side method to call <b>for</b> load() requests\r</i>
-        load: Profile.getBasicInfo,\r
-        <i>// The server-side must mark the submit handler as a <em>'formHandler'</em>\r</i>
-        submit: Profile.updateBasicInfo\r
-    },\r
-    <i>// specify the order <b>for</b> the passed params\r</i>
-    paramOrder: [<em>'uid'</em>, <em>'foo'</em>]\r
-});\r
-\r
-<i>// load the form\r</i>
-myFormPanel.getForm().load({\r
-    <i>// pass 2 arguments to server side getBasicInfo method (len=2)\r</i>
-    params: {\r
-        foo: <em>'bar'</em>,\r
-        uid: 34\r
-    }\r
-});</code></pre>\r
-The data packet sent to the server will resemble something like:\r
-<pre><code>[\r
-    {\r
-        <em>"action"</em>:<em>"Profile"</em>,<em>"method"</em>:<em>"getBasicInfo"</em>,<em>"type"</em>:<em>"rpc"</em>,<em>"tid"</em>:2,\r
-        <em>"data"</em>:[34,<em>"bar"</em>] <i>// note the order of the params\r</i>
-    }\r
-]</code></pre>\r
-The form will process a data packet returned by the server that is similar\r
-to the following format:\r
-<pre><code>[\r
-    {\r
-        <em>"action"</em>:<em>"Profile"</em>,<em>"method"</em>:<em>"getBasicInfo"</em>,<em>"type"</em>:<em>"rpc"</em>,<em>"tid"</em>:2,\r
-        <em>"result"</em>:{\r
-            <em>"success"</em>:true,\r
-            <em>"data"</em>:{\r
-                <em>"name"</em>:<em>"Fred Flintstone"</em>,\r
-                <em>"company"</em>:<em>"Slate Rock and Gravel"</em>,\r
-                <em>"email"</em>:<em>"fred.flintstone@slaterg.com"</em>\r
-            }\r
-        }\r
-    }\r
-]</code></pre></div><div class="hr"></div><a id="Ext.form.Action.DirectLoad-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-failure"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-failure">failure</a></b> : Function<div class="mdesc"><div class="short">The function to call when a failure packet was recieved, or when an&#13;\r
-error ocurred in the Ajax communication.&#13;\r
-The fu...</div><div class="long">The function to call when a failure packet was recieved, or when an\r
-error ocurred in the Ajax communication.\r
-The function is passed the following parameters:<ul class="mdetail-params">\r
-<li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>\r
-<li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. If an Ajax\r
-error ocurred, the failure type will be in <a href="output/Ext.form.Action.html#Ext.form.Action-failureType" ext:member="failureType" ext:cls="Ext.form.Action">failureType</a>. The <a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>\r
-property of this object may be examined to perform custom postprocessing.</div></li>\r
-</ul></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#failure" ext:member="#failure" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-method"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-method">method</a></b> : String<div class="mdesc"><div class="short">The HTTP method to use to access the requested URL. Defaults to the&#13;\r
-Ext.form.BasicForm's method, or if that is not s...</div><div class="long">The HTTP method to use to access the requested URL. Defaults to the\r
-<a href="output/Ext.form.BasicForm.html" ext:cls="Ext.form.BasicForm">Ext.form.BasicForm</a>'s method, or if that is not specified, the underlying DOM form's method.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#method" ext:member="#method" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-params"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-params">params</a></b> : Mixed<div class="mdesc"><div class="short">Extra parameter values to pass. These are added to the Form's&#13;\r
-Ext.form.BasicForm.baseParams and passed to the specif...</div><div class="long"><p>Extra parameter values to pass. These are added to the Form's\r
-<a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-baseParams" ext:member="baseParams" ext:cls="Ext.form.BasicForm">Ext.form.BasicForm.baseParams</a> and passed to the specified URL along with the Form's\r
-input fields.</p>\r
-<p>Parameters are encoded as standard HTTP parameters using <a href="output/Ext.html#Ext-urlEncode" ext:member="urlEncode" ext:cls="Ext">Ext.urlEncode</a>.</p></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#params" ext:member="#params" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-reset"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-reset">reset</a></b> : Boolean<div class="mdesc"><div class="short">When set to true, causes the Form to be&#13;\r
-reset on Action success. If specified, this happens&#13;\r
-before the success call...</div><div class="long">When set to <tt><b>true</b></tt>, causes the Form to be\r
-<a href="output/Ext.form.BasicForm.reset.html" ext:cls="Ext.form.BasicForm.reset">reset</a> on Action success. If specified, this happens\r
-<b>before</b> the <a href="output/Ext.form.Action.html#Ext.form.Action-success" ext:member="success" ext:cls="Ext.form.Action">success</a> callback is called and before the Form's\r
-<a href="output/Ext.form.BasicForm.actioncomplete.html" ext:cls="Ext.form.BasicForm.actioncomplete">actioncomplete</a> event fires.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#reset" ext:member="#reset" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-scope"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-scope">scope</a></b> : Object<div class="mdesc">The scope in which to call the callback functions (The <tt>this</tt> reference\r
-for the callback functions).</div></td><td class="msource"><a href="output/Ext.form.Action.html#scope" ext:member="#scope" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-success"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-success">success</a></b> : Function<div class="mdesc"><div class="short">The function to call when a valid success return packet is recieved.&#13;\r
-The function is passed the following parameters...</div><div class="long">The function to call when a valid success return packet is recieved.\r
-The function is passed the following parameters:<ul class="mdetail-params">\r
-<li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>\r
-<li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. The <a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>\r
-property of this object may be examined to perform custom postprocessing.</div></li>\r
-</ul></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#success" ext:member="#success" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-timeout"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-timeout">timeout</a></b> : Number<div class="mdesc"><div class="short">The number of seconds to wait for a server response before&#13;\r
-failing with the failureType as Action.CONNECT_FAILURE. I...</div><div class="long">The number of seconds to wait for a server response before\r
-failing with the <a href="output/Ext.form.Action.html#Ext.form.Action-failureType" ext:member="failureType" ext:cls="Ext.form.Action">failureType</a> as <a href="output/Ext.form.Action.html#Ext.form.Action-Action.CONNECT_FAILURE" ext:member="Action.CONNECT_FAILURE" ext:cls="Ext.form.Action">Action.CONNECT_FAILURE</a>. If not specified,\r
-defaults to the configured <tt><a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-timeout" ext:member="timeout" ext:cls="Ext.form.BasicForm">timeout</a></tt> of the\r
-<a href="output/Ext.form.BasicForm.html" ext:cls="Ext.form.BasicForm">form</a>.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#timeout" ext:member="#timeout" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-url"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-url">url</a></b> : String<div class="mdesc">The URL that the Action is to invoke.</div></td><td class="msource"><a href="output/Ext.form.Action.html#url" ext:member="#url" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-waitMsg"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-waitMsg">waitMsg</a></b> : String<div class="mdesc">The message to be displayed by a call to <a href="output/Ext.MessageBox.html#Ext.MessageBox-wait" ext:member="wait" ext:cls="Ext.MessageBox">Ext.MessageBox.wait</a>\r
-during the time the action is being processed.</div></td><td class="msource"><a href="output/Ext.form.Action.html#waitMsg" ext:member="#waitMsg" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-waitTitle"></a><b><a href="source/Action1.html#cfg-Ext.form.Action-waitTitle">waitTitle</a></b> : String<div class="mdesc">The title to be displayed by a call to <a href="output/Ext.MessageBox.html#Ext.MessageBox-wait" ext:member="wait" ext:cls="Ext.MessageBox">Ext.MessageBox.wait</a>\r
-during the time the action is being processed.</div></td><td class="msource"><a href="output/Ext.form.Action.html#waitTitle" ext:member="#waitTitle" ext:cls="Ext.form.Action">Action</a></td></tr></tbody></table><a id="Ext.form.Action.DirectLoad-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-CLIENT_INVALID"></a><b><a href="source/Action1.html#prop-Ext.form.Action-CLIENT_INVALID">CLIENT_INVALID</a></b> : String<div class="mdesc"><div class="short">Failure type returned when client side validation of the Form fails&#13;\r
-thus aborting a submit action. Client side valid...</div><div class="long">Failure type returned when client side validation of the Form fails\r
-thus aborting a submit action. Client side validation is performed unless\r
-<a href="output/Ext.form.Action.html#Ext.form.Action-clientValidation" ext:member="clientValidation" ext:cls="Ext.form.Action">clientValidation</a> is explicitly set to <tt>false</tt>.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#CLIENT_INVALID" ext:member="#CLIENT_INVALID" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-CONNECT_FAILURE"></a><b><a href="source/Action1.html#prop-Ext.form.Action-CONNECT_FAILURE">CONNECT_FAILURE</a></b> : String<div class="mdesc"><div class="short">Failure type returned when a communication error happens when attempting&#13;\r
-to send a request to the remote server. The...</div><div class="long">Failure type returned when a communication error happens when attempting\r
-to send a request to the remote server. The <a href="output/Ext.form.Action.html#Ext.form.Action-response" ext:member="response" ext:cls="Ext.form.Action">response</a> may be examined to\r
-provide further information.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#CONNECT_FAILURE" ext:member="#CONNECT_FAILURE" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-LOAD_FAILURE"></a><b><a href="source/Action1.html#prop-Ext.form.Action-LOAD_FAILURE">LOAD_FAILURE</a></b> : String<div class="mdesc"><div class="short">Failure type returned when the response's &lt;tt style="font-weight:bold"&gt;success&#13;\r
-property is set to false, or no field...</div><div class="long">Failure type returned when the response's <tt style="font-weight:bold">success</tt>\r
-property is set to <tt>false</tt>, or no field values are returned in the response's\r
-<tt style="font-weight:bold">data</tt> property.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#LOAD_FAILURE" ext:member="#LOAD_FAILURE" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-SERVER_INVALID"></a><b><a href="source/Action1.html#prop-Ext.form.Action-SERVER_INVALID">SERVER_INVALID</a></b> : String<div class="mdesc"><div class="short">Failure type returned when server side processing fails and the result's&#13;\r
-&lt;tt style="font-weight:bold"&gt;success proper...</div><div class="long"><p>Failure type returned when server side processing fails and the <a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>'s\r
-<tt style="font-weight:bold">success</tt> property is set to <tt>false</tt>.</p>\r
-<p>In the case of a form submission, field-specific error messages may be returned in the\r
-<a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>'s <tt style="font-weight:bold">errors</tt> property.</p></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#SERVER_INVALID" ext:member="#SERVER_INVALID" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-failureType"></a><b><a href="source/Action1.html#prop-Ext.form.Action-failureType">failureType</a></b> : String<div class="mdesc"><div class="short">The type of failure detected will be one of these: CLIENT_INVALID,&#13;\r
-SERVER_INVALID, CONNECT_FAILURE, or LOAD_FAILURE....</div><div class="long">The type of failure detected will be one of these: <a href="output/Ext.form.Action.html#Ext.form.Action-CLIENT_INVALID" ext:member="CLIENT_INVALID" ext:cls="Ext.form.Action">CLIENT_INVALID</a>,\r
-<a href="output/Ext.form.Action.html#Ext.form.Action-SERVER_INVALID" ext:member="SERVER_INVALID" ext:cls="Ext.form.Action">SERVER_INVALID</a>, <a href="output/Ext.form.Action.html#Ext.form.Action-CONNECT_FAILURE" ext:member="CONNECT_FAILURE" ext:cls="Ext.form.Action">CONNECT_FAILURE</a>, or <a href="output/Ext.form.Action.html#Ext.form.Action-LOAD_FAILURE" ext:member="LOAD_FAILURE" ext:cls="Ext.form.Action">LOAD_FAILURE</a>.  Usage:\r
-<pre><code><b>var</b> fp = <b>new</b> Ext.form.FormPanel({\r
-...\r
-buttons: [{\r
-    text: <em>'Save'</em>,\r
-    formBind: true,\r
-    handler: <b>function</b>(){\r
-        <b>if</b>(fp.getForm().isValid()){\r
-            fp.getForm().submit({\r
-                url: <em>'form-submit.php'</em>,\r
-                waitMsg: <em>'Submitting your data...'</em>,\r
-                success: <b>function</b>(form, action){\r
-                    <i>// server responded <b>with</b> success = true\r</i>
-                    <b>var</b> result = action.<a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>;\r
-                },\r
-                failure: <b>function</b>(form, action){\r
-                    <b>if</b> (action.<a href="output/Ext.form.Action.html#Ext.form.Action-failureType" ext:member="failureType" ext:cls="Ext.form.Action">failureType</a> === Ext.form.Action.<a href="output/Ext.form.Action.html#Ext.form.Action-CONNECT_FAILURE" ext:member="CONNECT_FAILURE" ext:cls="Ext.form.Action">CONNECT_FAILURE</a>) {\r
-                        Ext.Msg.alert(<em>'Error'</em>,\r
-                            <em>'Status:'</em>+action.<a href="output/Ext.form.Action.html#Ext.form.Action-response" ext:member="response" ext:cls="Ext.form.Action">response</a>.status+<em>': '</em>+\r
-                            action.<a href="output/Ext.form.Action.html#Ext.form.Action-response" ext:member="response" ext:cls="Ext.form.Action">response</a>.statusText);\r
-                    }\r
-                    <b>if</b> (action.failureType === Ext.form.Action.<a href="output/Ext.form.Action.html#Ext.form.Action-SERVER_INVALID" ext:member="SERVER_INVALID" ext:cls="Ext.form.Action">SERVER_INVALID</a>){\r
-                        <i>// server responded <b>with</b> success = false\r</i>
-                        Ext.Msg.alert(<em>'Invalid'</em>, action.<a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>.errormsg);\r
-                    }\r
-                }\r
-            });\r
-        }\r
-    }\r
-},{\r
-    text: <em>'Reset'</em>,\r
-    handler: <b>function</b>(){\r
-        fp.getForm().reset();\r
-    }\r
-}]</code></pre></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#failureType" ext:member="#failureType" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-response"></a><b><a href="source/Action1.html#prop-Ext.form.Action-response">response</a></b> : Object<div class="mdesc">The XMLHttpRequest object used to perform the action.</div></td><td class="msource"><a href="output/Ext.form.Action.html#response" ext:member="#response" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-result"></a><b><a href="source/Action1.html#prop-Ext.form.Action-result">result</a></b> : Object<div class="mdesc"><div class="short">The decoded response object containing a boolean &lt;tt style="font-weight:bold"&gt;success property and&#13;\r
-other, action-spe...</div><div class="long">The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and\r
-other, action-specific properties.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#result" ext:member="#result" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-type"></a><b><a href="source/Action1.html#prop-Ext.form.Action-type">type</a></b> : String<div class="mdesc">The type of action this Action instance performs.\r
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.form.Action.DirectLoad-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.form.Action.DirectLoad-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.form.Action.DirectLoad-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.form.Action.DirectLoad-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.form.Action.DirectLoad"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.form.Action.html" ext:member="" ext:cls="Ext.form.Action">Action</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.form.Action.Load.html" ext:member="" ext:cls="Ext.form.Action.Load">Action.Load</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif">Action.DirectLoad</pre></div><h1>Class <a href="source/Action.html#cls-Ext.form.Action.DirectLoad">Ext.form.Action.DirectLoad</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/Action.html#cls-Ext.form.Action.DirectLoad">Action.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Action.html#cls-Ext.form.Action.DirectLoad">Action.DirectLoad</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.form.Action.Load.html" ext:cls="Ext.form.Action.Load" ext:member="">Action.Load</a></td></tr></table><div class="description"><p>Provides Ext.direct support for loading form data.</p>
+<p>This example illustrates usage of Ext.Direct to <b>load</b> a form through Ext.Direct.</p>
+<pre><code><b>var</b> myFormPanel = <b>new</b> Ext.form.FormPanel({
+    <i>// configs <b>for</b> FormPanel</i>
+    title: <em>'Basic Information'</em>,
+    renderTo: document.body,
+    width: 300, height: 160,
+    padding: 10,
+
+    <i>// configs apply to child items</i>
+    defaults: {anchor: <em>'100%'</em>},
+    defaultType: <em>'textfield'</em>,
+    items: [{
+        fieldLabel: <em>'Name'</em>,
+        name: <em>'name'</em>
+    },{
+        fieldLabel: <em>'Email'</em>,
+        name: <em>'email'</em>
+    },{
+        fieldLabel: <em>'Company'</em>,
+        name: <em>'company'</em>
+    }],
+
+    <i>// configs <b>for</b> BasicForm</i>
+    api: {
+        <i>// The server-side method to call <b>for</b> load() requests</i>
+        load: Profile.getBasicInfo,
+        <i>// The server-side must mark the submit handler as a <em>'formHandler'</em></i>
+        submit: Profile.updateBasicInfo
+    },
+    <i>// specify the order <b>for</b> the passed params</i>
+    paramOrder: [<em>'uid'</em>, <em>'foo'</em>]
+});
+
+<i>// load the form</i>
+myFormPanel.getForm().load({
+    <i>// pass 2 arguments to server side getBasicInfo method (len=2)</i>
+    params: {
+        foo: <em>'bar'</em>,
+        uid: 34
+    }
+});</code></pre>
+The data packet sent to the server will resemble something like:
+<pre><code>[
+    {
+        <em>"action"</em>:<em>"Profile"</em>,<em>"method"</em>:<em>"getBasicInfo"</em>,<em>"type"</em>:<em>"rpc"</em>,<em>"tid"</em>:2,
+        <em>"data"</em>:[34,<em>"bar"</em>] <i>// note the order of the params</i>
+    }
+]</code></pre>
+The form will process a data packet returned by the server that is similar
+to the following format:
+<pre><code>[
+    {
+        <em>"action"</em>:<em>"Profile"</em>,<em>"method"</em>:<em>"getBasicInfo"</em>,<em>"type"</em>:<em>"rpc"</em>,<em>"tid"</em>:2,
+        <em>"result"</em>:{
+            <em>"success"</em>:true,
+            <em>"data"</em>:{
+                <em>"name"</em>:<em>"Fred Flintstone"</em>,
+                <em>"company"</em>:<em>"Slate Rock and Gravel"</em>,
+                <em>"email"</em>:<em>"fred.flintstone@slaterg.com"</em>
+            }
+        }
+    }
+]</code></pre></div><div class="hr"></div><a id="Ext.form.Action.DirectLoad-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-failure"></a><b><a href="source/Action.html#cfg-Ext.form.Action-failure">failure</a></b> : Function<div class="mdesc"><div class="short">The function to call when a failure packet was recieved, or when an
+error ocurred in the Ajax communication.
+The func...</div><div class="long">The function to call when a failure packet was recieved, or when an
+error ocurred in the Ajax communication.
+The function is passed the following parameters:<ul class="mdetail-params">
+<li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+<li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. If an Ajax
+error ocurred, the failure type will be in <a href="output/Ext.form.Action.html#Ext.form.Action-failureType" ext:member="failureType" ext:cls="Ext.form.Action">failureType</a>. The <a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>
+property of this object may be examined to perform custom postprocessing.</div></li>
+</ul></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#failure" ext:member="#failure" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-method"></a><b><a href="source/Action.html#cfg-Ext.form.Action-method">method</a></b> : String<div class="mdesc"><div class="short">The HTTP method to use to access the requested URL. Defaults to the
+Ext.form.BasicForm's method, or if that is not sp...</div><div class="long">The HTTP method to use to access the requested URL. Defaults to the
+<a href="output/Ext.form.BasicForm.html" ext:cls="Ext.form.BasicForm">Ext.form.BasicForm</a>'s method, or if that is not specified, the underlying DOM form's method.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#method" ext:member="#method" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-params"></a><b><a href="source/Action.html#cfg-Ext.form.Action-params">params</a></b> : Mixed<div class="mdesc"><div class="short">Extra parameter values to pass. These are added to the Form's
+Ext.form.BasicForm.baseParams and passed to the specifi...</div><div class="long"><p>Extra parameter values to pass. These are added to the Form's
+<a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-baseParams" ext:member="baseParams" ext:cls="Ext.form.BasicForm">Ext.form.BasicForm.baseParams</a> and passed to the specified URL along with the Form's
+input fields.</p>
+<p>Parameters are encoded as standard HTTP parameters using <a href="output/Ext.html#Ext-urlEncode" ext:member="urlEncode" ext:cls="Ext">Ext.urlEncode</a>.</p></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#params" ext:member="#params" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-reset"></a><b><a href="source/Action.html#cfg-Ext.form.Action-reset">reset</a></b> : Boolean<div class="mdesc"><div class="short">When set to true, causes the Form to be
+reset on Action success. If specified, this happens
+before the success callba...</div><div class="long">When set to <tt><b>true</b></tt>, causes the Form to be
+<a href="output/Ext.form.BasicForm.reset.html" ext:cls="Ext.form.BasicForm.reset">reset</a> on Action success. If specified, this happens
+<b>before</b> the <a href="output/Ext.form.Action.html#Ext.form.Action-success" ext:member="success" ext:cls="Ext.form.Action">success</a> callback is called and before the Form's
+<a href="output/Ext.form.BasicForm.actioncomplete.html" ext:cls="Ext.form.BasicForm.actioncomplete">actioncomplete</a> event fires.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#reset" ext:member="#reset" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-scope"></a><b><a href="source/Action.html#cfg-Ext.form.Action-scope">scope</a></b> : Object<div class="mdesc">The scope in which to call the callback functions (The <tt>this</tt> reference
+for the callback functions).</div></td><td class="msource"><a href="output/Ext.form.Action.html#scope" ext:member="#scope" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-submitEmptyText"></a><b><a href="source/Action.html#cfg-Ext.form.Action-submitEmptyText">submitEmptyText</a></b> : Boolean<div class="mdesc">If set to <tt>true</tt>, the emptyText value will be sent with the form
+when it is submitted.  Defaults to <tt>true</tt>.</div></td><td class="msource"><a href="output/Ext.form.Action.html#submitEmptyText" ext:member="#submitEmptyText" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-success"></a><b><a href="source/Action.html#cfg-Ext.form.Action-success">success</a></b> : Function<div class="mdesc"><div class="short">The function to call when a valid success return packet is recieved.
+The function is passed the following parameters:...</div><div class="long">The function to call when a valid success return packet is recieved.
+The function is passed the following parameters:<ul class="mdetail-params">
+<li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+<li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. The <a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>
+property of this object may be examined to perform custom postprocessing.</div></li>
+</ul></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#success" ext:member="#success" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-timeout"></a><b><a href="source/Action.html#cfg-Ext.form.Action-timeout">timeout</a></b> : Number<div class="mdesc"><div class="short">The number of seconds to wait for a server response before
+failing with the failureType as Action.CONNECT_FAILURE. If...</div><div class="long">The number of seconds to wait for a server response before
+failing with the <a href="output/Ext.form.Action.html#Ext.form.Action-failureType" ext:member="failureType" ext:cls="Ext.form.Action">failureType</a> as <a href="output/Ext.form.Action.html#Ext.form.Action-Action.CONNECT_FAILURE" ext:member="Action.CONNECT_FAILURE" ext:cls="Ext.form.Action">Action.CONNECT_FAILURE</a>. If not specified,
+defaults to the configured <tt><a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-timeout" ext:member="timeout" ext:cls="Ext.form.BasicForm">timeout</a></tt> of the
+<a href="output/Ext.form.BasicForm.html" ext:cls="Ext.form.BasicForm">form</a>.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#timeout" ext:member="#timeout" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-url"></a><b><a href="source/Action.html#cfg-Ext.form.Action-url">url</a></b> : String<div class="mdesc">The URL that the Action is to invoke.</div></td><td class="msource"><a href="output/Ext.form.Action.html#url" ext:member="#url" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-waitMsg"></a><b><a href="source/Action.html#cfg-Ext.form.Action-waitMsg">waitMsg</a></b> : String<div class="mdesc">The message to be displayed by a call to <a href="output/Ext.MessageBox.html#Ext.MessageBox-wait" ext:member="wait" ext:cls="Ext.MessageBox">Ext.MessageBox.wait</a>
+during the time the action is being processed.</div></td><td class="msource"><a href="output/Ext.form.Action.html#waitMsg" ext:member="#waitMsg" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-waitTitle"></a><b><a href="source/Action.html#cfg-Ext.form.Action-waitTitle">waitTitle</a></b> : String<div class="mdesc">The title to be displayed by a call to <a href="output/Ext.MessageBox.html#Ext.MessageBox-wait" ext:member="wait" ext:cls="Ext.MessageBox">Ext.MessageBox.wait</a>
+during the time the action is being processed.</div></td><td class="msource"><a href="output/Ext.form.Action.html#waitTitle" ext:member="#waitTitle" ext:cls="Ext.form.Action">Action</a></td></tr></tbody></table><a id="Ext.form.Action.DirectLoad-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-CLIENT_INVALID"></a><b><a href="source/Action.html#prop-Ext.form.Action-CLIENT_INVALID">CLIENT_INVALID</a></b> : String<div class="mdesc"><div class="short">Failure type returned when client side validation of the Form fails
+thus aborting a submit action. Client side valida...</div><div class="long">Failure type returned when client side validation of the Form fails
+thus aborting a submit action. Client side validation is performed unless
+<a href="output/Ext.form.Action.html#Ext.form.Action-clientValidation" ext:member="clientValidation" ext:cls="Ext.form.Action">clientValidation</a> is explicitly set to <tt>false</tt>.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#CLIENT_INVALID" ext:member="#CLIENT_INVALID" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-CONNECT_FAILURE"></a><b><a href="source/Action.html#prop-Ext.form.Action-CONNECT_FAILURE">CONNECT_FAILURE</a></b> : String<div class="mdesc"><div class="short">Failure type returned when a communication error happens when attempting
+to send a request to the remote server. The ...</div><div class="long">Failure type returned when a communication error happens when attempting
+to send a request to the remote server. The <a href="output/Ext.form.Action.html#Ext.form.Action-response" ext:member="response" ext:cls="Ext.form.Action">response</a> may be examined to
+provide further information.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#CONNECT_FAILURE" ext:member="#CONNECT_FAILURE" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-LOAD_FAILURE"></a><b><a href="source/Action.html#prop-Ext.form.Action-LOAD_FAILURE">LOAD_FAILURE</a></b> : String<div class="mdesc"><div class="short">Failure type returned when the response's &lt;tt style="font-weight:bold"&gt;success
+property is set to false, or no field ...</div><div class="long">Failure type returned when the response's <tt style="font-weight:bold">success</tt>
+property is set to <tt>false</tt>, or no field values are returned in the response's
+<tt style="font-weight:bold">data</tt> property.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#LOAD_FAILURE" ext:member="#LOAD_FAILURE" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-SERVER_INVALID"></a><b><a href="source/Action.html#prop-Ext.form.Action-SERVER_INVALID">SERVER_INVALID</a></b> : String<div class="mdesc"><div class="short">Failure type returned when server side processing fails and the result's
+&lt;tt style="font-weight:bold"&gt;success propert...</div><div class="long"><p>Failure type returned when server side processing fails and the <a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>'s
+<tt style="font-weight:bold">success</tt> property is set to <tt>false</tt>.</p>
+<p>In the case of a form submission, field-specific error messages may be returned in the
+<a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>'s <tt style="font-weight:bold">errors</tt> property.</p></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#SERVER_INVALID" ext:member="#SERVER_INVALID" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-failureType"></a><b><a href="source/Action.html#prop-Ext.form.Action-failureType">failureType</a></b> : String<div class="mdesc"><div class="short">The type of failure detected will be one of these: CLIENT_INVALID,
+SERVER_INVALID, CONNECT_FAILURE, or LOAD_FAILURE. ...</div><div class="long">The type of failure detected will be one of these: <a href="output/Ext.form.Action.html#Ext.form.Action-CLIENT_INVALID" ext:member="CLIENT_INVALID" ext:cls="Ext.form.Action">CLIENT_INVALID</a>,
+<a href="output/Ext.form.Action.html#Ext.form.Action-SERVER_INVALID" ext:member="SERVER_INVALID" ext:cls="Ext.form.Action">SERVER_INVALID</a>, <a href="output/Ext.form.Action.html#Ext.form.Action-CONNECT_FAILURE" ext:member="CONNECT_FAILURE" ext:cls="Ext.form.Action">CONNECT_FAILURE</a>, or <a href="output/Ext.form.Action.html#Ext.form.Action-LOAD_FAILURE" ext:member="LOAD_FAILURE" ext:cls="Ext.form.Action">LOAD_FAILURE</a>.  Usage:
+<pre><code><b>var</b> fp = <b>new</b> Ext.form.FormPanel({
+...
+buttons: [{
+    text: <em>'Save'</em>,
+    formBind: true,
+    handler: <b>function</b>(){
+        <b>if</b>(fp.getForm().isValid()){
+            fp.getForm().submit({
+                url: <em>'form-submit.php'</em>,
+                waitMsg: <em>'Submitting your data...'</em>,
+                success: <b>function</b>(form, action){
+                    <i>// server responded <b>with</b> success = true</i>
+                    <b>var</b> result = action.<a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>;
+                },
+                failure: <b>function</b>(form, action){
+                    <b>if</b> (action.<a href="output/Ext.form.Action.html#Ext.form.Action-failureType" ext:member="failureType" ext:cls="Ext.form.Action">failureType</a> === Ext.form.Action.<a href="output/Ext.form.Action.html#Ext.form.Action-CONNECT_FAILURE" ext:member="CONNECT_FAILURE" ext:cls="Ext.form.Action">CONNECT_FAILURE</a>) {
+                        Ext.Msg.alert(<em>'Error'</em>,
+                            <em>'Status:'</em>+action.<a href="output/Ext.form.Action.html#Ext.form.Action-response" ext:member="response" ext:cls="Ext.form.Action">response</a>.status+<em>': '</em>+
+                            action.<a href="output/Ext.form.Action.html#Ext.form.Action-response" ext:member="response" ext:cls="Ext.form.Action">response</a>.statusText);
+                    }
+                    <b>if</b> (action.failureType === Ext.form.Action.<a href="output/Ext.form.Action.html#Ext.form.Action-SERVER_INVALID" ext:member="SERVER_INVALID" ext:cls="Ext.form.Action">SERVER_INVALID</a>){
+                        <i>// server responded <b>with</b> success = false</i>
+                        Ext.Msg.alert(<em>'Invalid'</em>, action.<a href="output/Ext.form.Action.html#Ext.form.Action-result" ext:member="result" ext:cls="Ext.form.Action">result</a>.errormsg);
+                    }
+                }
+            });
+        }
+    }
+},{
+    text: <em>'Reset'</em>,
+    handler: <b>function</b>(){
+        fp.getForm().reset();
+    }
+}]</code></pre></div></div></td><td class="msource"><a href="output/Ext.form.Action.html#failureType" ext:member="#failureType" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-response"></a><b><a href="source/Action.html#prop-Ext.form.Action-response">response</a></b> : Object<div class="mdesc">The XMLHttpRequest object used to perform the action.</div></td><td class="msource"><a href="output/Ext.form.Action.html#response" ext:member="#response" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-result"></a><b><a href="source/Action.html#prop-Ext.form.Action-result">result</a></b> : Object<div class="mdesc"><div class="short">The decoded response object containing a boolean &lt;tt style="font-weight:bold"&gt;success property and
+other, action-spec...</div><div class="long">The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
+other, action-specific properties.</div></div></td><td class="msource"><a href="output/Ext.form.Action.html#result" ext:member="#result" ext:cls="Ext.form.Action">Action</a></td></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Action-type"></a><b><a href="source/Action.html#prop-Ext.form.Action-type">type</a></b> : String<div class="mdesc">The type of action this Action instance performs.
 Currently only "submit" and "load" are supported.</div></td><td class="msource"><a href="output/Ext.form.Action.html#type" ext:member="#type" ext:cls="Ext.form.Action">Action</a></td></tr></tbody></table><a id="Ext.form.Action.DirectLoad-methods"></a><h2>Public Methods</h2><div class="no-members">This class has no public methods.</div><a id="Ext.form.Action.DirectLoad-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>
\ No newline at end of file