PDA

View Full Version : best practice for multiple combo boxes in a single form



borism
16 Dec 2010, 8:44 AM
Hi,
I have this problem\question that I would like to share hopping that someone can advice me.

I am working (using designer) on a configuration panel that has three fieldsets, each fieldset holds multiple comboboxes,checkboxes and text\numeric fields.

On submit, the whole data on the page needs to go to the server that is about 20 combos and other components.

can anyone advice me on how to smarly use the store\stores to populate the whole screen (from the server's logic's point of view the most logical choise will be having a store for each fielddset).

binding each combo to a store seems bad practice (+ the server side runs on embeded linux so I dont know how will the serber side respond to so many calls).

if I could have 3 stores, one for each filedset and have a way of loading the combos for each field from that store Ithink that would be best but I'm not sure if it is correct and if stores should be used that way

any suggestions?

Thanks so much,
Boris

feyyaz
16 Dec 2010, 10:17 AM
Use Ext.Direct, it bundels all seperate server Ajax calls into one call, extremly effective, i wouldn't know what to do wihout it.

http://www.sencha.com/products/js/direct.php

Screamy
16 Dec 2010, 10:36 AM
Opinions will vary and I don't necessarily claim this to the 'preferred' (or even 'right' approach), but here's what works for me:

During my app's initialization, I load up a 'stores.js' file which contains a list of globally used JsonStores. One instance of a store from this list may be referenced/used by combo's in several different panels/pages of the application.

If a user dynamically edits any of the data used by a global store, I call a reload on the store and all related combos are now up-to-date as well.