You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
70 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.data.JsonP.Ext_data_DirectProxy({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.data.DataProxy","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='docClass'>Ext.util.Observable</a><div class='subclass '><a href='#!/api/Ext.data.DataProxy' rel='Ext.data.DataProxy' class='docClass'>Ext.data.DataProxy</a><div class='subclass '><strong>Ext.data.DirectProxy</strong></div></div></div><h4>Files</h4><div class='dependency'><a href='source/DirectProxy.html#Ext-data-DirectProxy' target='_blank'>DirectProxy.js</a></div></pre><div class='doc-contents'>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-api' class='member first-child inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Ext.data.DataProxy' rel='Ext.data.DataProxy' class='defined-in docClass'>Ext.data.DataProxy</a><br/><a href='source/DataProxy.html#Ext-data-DataProxy-cfg-api' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.data.DataProxy-cfg-api' class='name expandable'>api</a><span> : Object</span></div><div class='description'><div class='short'>Specific urls to call on CRUD action methods \"read\", \"create\", \"update\" and \"destroy\". ...</div><div class='long'><p>Specific urls to call on CRUD action methods \"read\", \"create\", \"update\" and \"destroy\".\nDefaults to:</p>\n\n<pre><code>api: {\n read : undefined,\n create : undefined,\n update : undefined,\n destroy : undefined\n}\n</code></pre>\n\n\n<p>The url is built based upon the action being executed <tt>[load|create|save|destroy]</tt>\nusing the commensurate <tt><a href=\"#!/api/Ext.data.DataProxy-cfg-api\" rel=\"Ext.data.DataProxy-cfg-api\" class=\"docClass\">api</a></tt> property, or if undefined default to the\nconfigured <a href=\"#!/api/Ext.data.Store\" rel=\"Ext.data.Store\" class=\"docClass\">Ext.data.Store</a>.<a href=\"#!/api/Ext.data.Store-cfg-url\" rel=\"Ext.data.Store-cfg-url\" class=\"docClass\">url</a>.</p>\n\n\n<br>\n\n\n<p>For example:</p>\n\n\n<pre><code>api: {\n load : '/controller/load',\n create : '/controller/new', // Server MUST return idProperty of new record\n save : '/controller/update',\n destroy : '/controller/destroy_action'\n}\n\n// Alternatively, one can use the object-form to specify each API-action\napi: {\n load: {url: 'read.php', method: 'GET'},\n create: 'create.php',\n destroy: 'destroy.php',\n save: 'update.php'\n}\n</code></pre>\n\n\n<p>If the specific URL for a given CRUD action is undefined, the CRUD action request\nwill be directed to the configured <tt><a href=\"#!/api/Ext.data.Connection-cfg-url\" rel=\"Ext.data.Connection-cfg-url\" class=\"docClass\">url</a></tt>.</p>\n\n\n<br><p><b>Note</b>: To modify the URL for an action dynamically the appropriate API\n\n\n<p>property should be modified before the action is requested using the corresponding before\naction event. For example to modify the URL associated with the load action:</p>\n\n<pre><code>// modify the url for the action\nmyStore.on({\n beforeload: {\n fn: function (store, options) {\n // use <tt><a href=\"#!/api/Ext.data.HttpProxy-method-setUrl\" rel=\"Ext.data.HttpProxy-method-setUrl\" class=\"docClass\">setUrl</a></tt> to change the URL for *just* this request.\n store.proxy.setUrl('changed1.php');\n\n // set optional second parameter to true to make this URL change\n // permanent, applying this URL for all subsequent requests.\n store.proxy.setUrl('changed1.php', true);\n\n // Altering the proxy API should be done using the public\n // method <tt><a href=\"#!/api/Ext.data.DataProxy-method-setApi\" rel=\"Ext.data.DataProxy-method-setApi\" class=