f122e7fc1f0c0fba5f9376f3edb19febc3e6c0a0.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <div class="body-wrap">
  2. <div class="top-tools">
  3. <a class="inner-link" href="#Ext.form.Action.Load-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
  4. <a class="inner-link" href="#Ext.form.Action.Load-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
  5. <a class="inner-link" href="#Ext.form.Action.Load-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
  6. <a class="inner-link" href="#Ext.form.Action.Load-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
  7. <a class="bookmark" href="../docs/?class=Ext.form.Action.Load"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
  8. </div>
  9. <div class="inheritance res-block">
  10. <pre class="res-block-inner"><a ext:cls="Ext.form.Action" ext:member="" href="output/Ext.form.Action.html">Action</a>
  11. <img src="resources/elbow-end.gif"/>Action.Load</pre></div>
  12. <h1>Class Ext.form.Action.Load</h1>
  13. <table cellspacing="0">
  14. <tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr>
  15. <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/Action.js" target="_blank">Action.js</a></td></tr>
  16. <tr><td class="label">Class:</td><td class="hd-info">Action.Load</td></tr>
  17. <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.form.Action" ext:member="" href="output/Ext.form.Action.html">Action</a></td></tr>
  18. </table>
  19. <div class="description">
  20. A class which handles loading of data from a server into the Fields of
  21. an <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a>.
  22. <br><br>
  23. Instances of this class are only created by a <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Form</a> when
  24. submitting.
  25. <br><br>
  26. A response packet <b>must</b> contain a boolean <tt style="font-weight:bold">success</tt> property, and
  27. a <tt style="font-weight:bold">data</tt> property. The <tt style="font-weight:bold">data</tt> property contains the
  28. values of Fields to load. The individual value object for each Field
  29. is passed to the Field's <a ext:cls="Ext.form.Field" ext:member="setValue" href="output/Ext.form.Field.html#setValue">setValue</a> method.
  30. <br><br>
  31. By default, response packets are assumed to be JSON, so a typical response
  32. packet may look like this:
  33. <br><br><pre><code>{
  34. success: true,
  35. data: {
  36. clientName: <em>"Fred. Olsen Lines"</em>,
  37. portOfLoading: <em>"FXT"</em>,
  38. portOfDischarge: <em>"OSL"</em>
  39. }
  40. }</code></pre>
  41. <br><br>
  42. Other data may be placed into the response for processing the the <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Form</a>'s callback
  43. or event handler methods. The object decoded from this JSON is available in the <a ext:cls="Ext.form.Action.Load" ext:member="result" href="output/Ext.form.Action.Load.html#result">result</a> property. </div>
  44. <div class="hr"></div>
  45. <a id="Ext.form.Action.Load-configs"></a>
  46. <h2>Config Options</h2>
  47. <table cellspacing="0" class="member-table">
  48. <tr>
  49. <th class="sig-header" colspan="2">Config Options</th>
  50. <th class="msource-header">Defined By</th>
  51. </tr>
  52. <tr class="config-row inherited expandable">
  53. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  54. <td class="sig">
  55. <a id="Ext.form.Action.Load-failure"></a>
  56. <b>failure</b> : Function <div class="mdesc">
  57. <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>
  58. <div class="long">
  59. 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 ext:cls="Ext.form.Action" ext:member="failureType" href="output/Ext.form.Action.html#failureType">failureType</a>. The <a ext:cls="Ext.form.Action" ext:member="result" href="output/Ext.form.Action.html#result">result</a> property of this object may be examined to perform custom postprocessing.</div></li> </ul> </div>
  60. </div>
  61. </td>
  62. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#failure" href="output/Ext.form.Action.html#failure">Action</a></td>
  63. </tr>
  64. <tr class="config-row inherited alt expandable">
  65. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  66. <td class="sig">
  67. <a id="Ext.form.Action.Load-method"></a>
  68. <b>method</b> : String <div class="mdesc">
  69. <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>
  70. <div class="long">
  71. The HTTP method to use to access the requested URL. Defaults to the <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a>'s method, or if that is not specified, the underlying DOM form's method. </div>
  72. </div>
  73. </td>
  74. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#method" href="output/Ext.form.Action.html#method">Action</a></td>
  75. </tr>
  76. <tr class="config-row inherited expandable">
  77. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  78. <td class="sig">
  79. <a id="Ext.form.Action.Load-params"></a>
  80. <b>params</b> : Mixed <div class="mdesc">
  81. <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>
  82. <div class="long">
  83. Extra parameter values to pass. These are added to the Form's <a ext:cls="Ext.form.BasicForm" ext:member="baseParams" href="output/Ext.form.BasicForm.html#baseParams">Ext.form.BasicForm.baseParams</a> and passed to the specified URL along with the Form's input fields. </div>
  84. </div>
  85. </td>
  86. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#params" href="output/Ext.form.Action.html#params">Action</a></td>
  87. </tr>
  88. <tr class="config-row inherited alt">
  89. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  90. <td class="sig">
  91. <a id="Ext.form.Action.Load-scope"></a>
  92. <b>scope</b> : Object <div class="mdesc">
  93. The scope in which to call the callback functions (The <tt>this</tt> reference for the callback functions). </div>
  94. </td>
  95. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#scope" href="output/Ext.form.Action.html#scope">Action</a></td>
  96. </tr>
  97. <tr class="config-row inherited expandable">
  98. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  99. <td class="sig">
  100. <a id="Ext.form.Action.Load-success"></a>
  101. <b>success</b> : Function <div class="mdesc">
  102. <div class="short">The function to call when a valid success return packet is recieved. The function is passed the following parameters:...</div>
  103. <div class="long">
  104. 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 ext:cls="Ext.form.Action" ext:member="result" href="output/Ext.form.Action.html#result">result</a> property of this object may be examined to perform custom postprocessing.</div></li> </ul> </div>
  105. </div>
  106. </td>
  107. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#success" href="output/Ext.form.Action.html#success">Action</a></td>
  108. </tr>
  109. <tr class="config-row inherited alt">
  110. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  111. <td class="sig">
  112. <a id="Ext.form.Action.Load-url"></a>
  113. <b>url</b> : String <div class="mdesc">
  114. The URL that the Action is to invoke. </div>
  115. </td>
  116. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#url" href="output/Ext.form.Action.html#url">Action</a></td>
  117. </tr>
  118. <tr class="config-row inherited">
  119. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  120. <td class="sig">
  121. <a id="Ext.form.Action.Load-waitMsg"></a>
  122. <b>waitMsg</b> : String <div class="mdesc">
  123. The message to be displayed by a call to <a ext:cls="Ext.MessageBox" ext:member="wait" href="output/Ext.MessageBox.html#wait">Ext.MessageBox.wait</a> during the time the action is being processed. </div>
  124. </td>
  125. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#waitMsg" href="output/Ext.form.Action.html#waitMsg">Action</a></td>
  126. </tr>
  127. <tr class="config-row inherited alt">
  128. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  129. <td class="sig">
  130. <a id="Ext.form.Action.Load-waitTitle"></a>
  131. <b>waitTitle</b> : String <div class="mdesc">
  132. The title to be displayed by a call to <a ext:cls="Ext.MessageBox" ext:member="wait" href="output/Ext.MessageBox.html#wait">Ext.MessageBox.wait</a> during the time the action is being processed. </div>
  133. </td>
  134. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#waitTitle" href="output/Ext.form.Action.html#waitTitle">Action</a></td>
  135. </tr>
  136. </table>
  137. <a id="Ext.form.Action.Load-props"></a>
  138. <h2>Public Properties</h2>
  139. <table cellspacing="0" class="member-table">
  140. <tr>
  141. <th class="sig-header" colspan="2">Property</th>
  142. <th class="msource-header">Defined By</th>
  143. </tr>
  144. <tr class="property-row inherited expandable">
  145. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  146. <td class="sig">
  147. <a id="Ext.form.Action.Load-failureType"></a>
  148. <b>failureType</b> : String <div class="mdesc">
  149. <div class="short">The type of failure detected. See {@link #Ext.form.Action-Action.CLIENT_INVALID CLIENT_INVALID}, {@link #Ext.form.Act...</div>
  150. <div class="long">
  151. The type of failure detected. See {@link #Ext.form.Action-Action.CLIENT_INVALID CLIENT_INVALID}, {@link #Ext.form.Action-Action.SERVER_INVALID SERVER_INVALID},
  152. {@link #Ext.form.Action-Action.CONNECT_FAILURE CONNECT_FAILURE}, {@link #Ext.form.Action-Action.LOAD_FAILURE LOAD_FAILURE} </div>
  153. </div>
  154. </td>
  155. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#failureType" href="output/Ext.form.Action.html#failureType">Action</a></td>
  156. </tr>
  157. <tr class="property-row inherited alt">
  158. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  159. <td class="sig">
  160. <a id="Ext.form.Action.Load-response"></a>
  161. <b>response</b> : Object <div class="mdesc">
  162. The XMLHttpRequest object used to perform the action. </div>
  163. </td>
  164. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#response" href="output/Ext.form.Action.html#response">Action</a></td>
  165. </tr>
  166. <tr class="property-row inherited">
  167. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  168. <td class="sig">
  169. <a id="Ext.form.Action.Load-result"></a>
  170. <b>result</b> : Object <div class="mdesc">
  171. The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
  172. other, action-specific properties. </div>
  173. </td>
  174. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#result" href="output/Ext.form.Action.html#result">Action</a></td>
  175. </tr>
  176. <tr class="property-row inherited alt">
  177. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  178. <td class="sig">
  179. <a id="Ext.form.Action.Load-type"></a>
  180. <b>type</b> : String <div class="mdesc">
  181. The type of action this Action instance performs.
  182. Currently only "submit" and "load" are supported. </div>
  183. </td>
  184. <td class="msource"><a ext:cls="Ext.form.Action" ext:member="#type" href="output/Ext.form.Action.html#type">Action</a></td>
  185. </tr>
  186. </table>
  187. <a id="Ext.form.Action.Load-methods"></a>
  188. <h2>Public Methods</h2>
  189. <div class="no-members">This class has no public methods.</div> <a id="Ext.form.Action.Load-events"></a>
  190. <h2>Public Events</h2>
  191. <div class="no-members">This class has no public events.</div>
  192. </div>