PDA

View Full Version : After ComboBox manual selection, the selections are cleared. Only in MVC



miked06
15 Mar 2012, 10:25 AM
I have a ComboBox hooked up to a store that manages a model called Field. When the page loads and the' afterrender'event is fired I then pre-select default choices from the ComboBox. Once the user can start using the application they click the ComboBox down-arrow-button and they then see all of the choices that are already selected highlighted. Now this works properly when I do NOT use the MVC architecture as seen here in this simplified jsfiddle :
http://jsfiddle.net/michaelcdillon/grCLU/11/

(http://jsfiddle.net/michaelcdillon/grCLU/11/)When I use the MVC architecture method with generally the same code the down-arrow-button clears out the pre-selected values in this jsfiddle:
http://jsfiddle.net/michaelcdillon/grCLU/10/

(http://jsfiddle.net/michaelcdillon/grCLU/10/)Why would this work in the direct methodology but not in the MVC way?

mitchellsimoens
15 Mar 2012, 11:07 AM
Are you selecting the items via setting the value?

miked06
15 Mar 2012, 11:29 AM
Yes I am. I just found out though that I can replicate the issue in both versions by having the queryMode config option of the combobox set to 'remote'. So there isn't a discrepancy, however I would really like to figure out how to make the values persist.