动态Ext.form.Combobox的写法<案例>

//遊戲名稱下拉store
				var gnamestore = new Ext.data.Store({ //动态store
                                  proxy: new Ext.data.HttpProxy({
                    				url: '../pages/gamania/gameserver!getGameNameCombo.action'
                                  }),
                                  reader: new Ext.data.JsonReader({
                             		 root : 'root' 
                                 },[{name:'VARIABLE_NAME'}])
                         	 });
                    		var gamecom = new Ext.form.ComboBox({   //下拉框combobox
                                                name:'gamaname',
                                                //fieldLabel:'',
                                                autoCreate: true,
                                               	listWidth: w,
                                                store: gnamestore,
                                                selectOnFocus:true,
                                                editable:false,
                                                displayField:'VARIABLE_NAME',
                                                typeAhead: true,
                                                mode: 'remote',
                                                triggerAction: 'all',
                                                valueField:'VARIABLE_NAME'
                                        });

你可能感兴趣的:(动态Ext.form.Combobox的写法<案例>)