Note that there are some explanatory texts on larger screens.

plurals
  1. POLoading data into model by id-Extjs
    text
    copied!<p>im trying to use direct store in Extjs<br> heres the code to my store</p> <pre><code>Ext.define('IDE.store.Files', { extend: 'Ext.data.Store', proxy: { type: 'direct', api: { create:Files.AddNew, read:Files.GetFile, update:Files.Update, destroy:Files.Delete, //load:Files.GetFile }, paramOrder:'Path' }, model:'IDE.model.File' }) </code></pre> <p>the code for model is </p> <pre><code>Ext.define('IDE.model.File', { extend: 'Ext.data.Model', fields: [ { name: 'Path', type: 'string' }, { name: 'Name', type: 'string' }, { name: 'Extention', type: 'string' }, { name: 'Content', type: 'string' } ], idProperty:'Path', store:'IDE.store.Files' }) </code></pre> <p>as you can see the <code>idProperty</code> is <code>Path</code><br> the following code segment is giving error</p> <pre><code>//this.getStore('IDE.store.Files').load(path, { sucess: function (file) { // console.log(file.get('Content')); // } }); this.getStore('IDE.store.Files').load(path); </code></pre> <p>here im getting <code>path</code> from somewhere and trying to load a file from the particular path the error is<br></p> <pre><code> Ext.data.proxy.Direct.doRequest(): No direct function specified for this proxy </code></pre> <p>now the problem is that documentation of extjs isnt enough and everywhere i searched i could only see 4 api in the <code>api</code> object of <code>proxy</code>. Which are <br> 1.create<br> 2.read<br> 3.update<br> 4.destroy<br><br> which api am i missing ? OR <br> where do i need to give a direct function for <code>load()</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload