PDA

View Full Version : Autocomplete with Ext.Direct Proxy...



neurodon
7 Sep 2012, 1:28 PM
I have autocomplete setup in my application just like in the example files. Recently, I have been moving my JSON proxies over to Direct proxies. Every other store worked fine out of the box, except for the autocomplete.

Here is my store configuration:



Ext.define('Core.store.app.controls.SearchBox', { extend: 'Ext.data.Store',
pageSize: 10,
model:'Core.model.app.controls.SearchBox',
autoLoad: true,

proxy: {
type: 'direct',
directFn: Core.api.Client.searchBox,
paramOrder: 'id' // Tells the proxy to pass the id as the first parameter to the remoting method.
}
});




When I type in the search box, the application sends the following request to the router:


"{"action":"Client","method":"searchBox","data":[null],"type":"rpc","tid":32}"

No reference to the "query", "start", or "limit" variables that were automatically sent when I bound the search box to the remote store previously.

What should I change?

neurodon
7 Sep 2012, 4:18 PM
Figured it out.


paramOrder: 'id'

was causing the store to not send any parameters. Removed it and it works fine.