View Full Version : ComboBox, use remote or local?

17 Sep 2010, 11:05 AM
I've been spending all morning flip-flopping between using a local or a remote combo. I need a combobox that loads the first time the user selects the trigger or types in the box. At first blush, I though "remote", it loads the first time the user clicks the trigger. Perfect. But, if you have typeahead, it will requery every time something is typed in the box. Hmmm.. maybe don't use remote, instead use 'local' and load on some event, like focus instead.

What I really need is a 'remote' combobox that switches to 'local' mode once the store is loaded. I really want the 'Loading' text that a remote combo gives you b/c this load is not snappy but I definitely do not want to requery every time the user types in the box.

Any suggestions on the best way to proceed? Tweak the combo with 'local' mode or the one with 'remote' mode?


17 Sep 2010, 11:39 AM
That's local you need then.

Load it and that's it.

When you load it is up to you.

20 Sep 2010, 6:51 AM
I tried to do as Animal suggested, and use 'local' mode, but my frustration level was rising too much trying to get the 'loadingText' to display. So, I switched gears and tried using 'remote' mode and added a listener to the combobox store load event and set the scope as the combobox. Then I just said 'combobox.mode = 'local'; for the 'load' event handler, and it worked as I wanted.

20 Sep 2010, 9:21 AM
Load the store immediately as part of application load.