View Full Version : Dynamic population of several combo boxes with different data. 1 request or multiple?

27 Oct 2011, 1:35 PM
Hi Guys

I have several combo boxes that will be used to define criteria for how a report is filtered. Each combo box will hold different data such as dates, products etc that need to be loaded from the server.

Is it possible to load these into 1 single store and request to the server? i.e. perhaps have an array of arrays, array 1 could be dates, while array 2 could be products.

Or is it best to these with multiple stores and multi requests to the server? The only thing I'm concerned about here's, is large numbers of requests flooding the server.

I know this is a newb question, but theres not exactly a lot of example showing how this could work.


27 Oct 2011, 3:20 PM
Hi kelv1n,

Batching multiple requests into one is one of the major features of Ext Direct (http://www.sencha.com/products/extjs/extdirect).

Another approach is to write a custom store and/or proxy to do this for you. Recent example here: http://www.sencha.com/forum/showthread.php?152057-Custom-proxy-to-read-from-another-store

Searching these forums you'll find plenty of material covering pros and cons of both solutions. I like this thread: http://www.sencha.com/forum/showthread.php?72400-Direct-or-REST-which-is-the-best-)

Best Regards

27 Oct 2011, 11:49 PM
Brilliant, thanks JambaFun :)

Note to Sencha, you need more tutorials on the basics!

29 Oct 2011, 10:30 AM
I'm doing this by only one request (direct). You can fill the stores manually. Store.loadData.