ComboBox на Panel-e.
как мне все-таки установить в ComboBox-е
1-й элемент? Вот код Panel-и: Ext.define('DQM3.view.SearchPanel', { extend: 'Ext.panel.Panel', alias:'widget.searchpanel', layout:'column', initComponent: function() { this.items = [{ xtype: 'searchfieldsetmainview', x:0, y:0, height: 650, width: 270, y:20, //columnWidth: 0.5, id : 'searchfieldsetmainview', title : 'Search' }], this.callParent(arguments); } });и вот мои ComboBox: Ext.define('DQM3.view.SearchFieldSetMainView' , { extend: 'Ext.form.FieldSet', alias : 'widget.searchfieldsetmainview', layout: { type: 'absolute' }, title: 'Search', initComponent: function() { var me = this; Ext.applyIf(me, { items: [{ xtype: 'combobox', width: 240, fieldLabel: 'Status', id: 'idStatus', x: 0, y: 0, mode: 'local', editable: false, triggerAction: 'all', store: 'StatusComboMainStore', valueField: 'status_code', displayField: 'status_desc' }] }); me.callParent(arguments); } });'StatusComboMainStore' определен и заполнен. (когда я раскриваю этот Combobox, то в нем есть все элементы) Хочется что б когда я "рендерю" (показываю) панель 1-й в Combobox-е был не "пробел" а тот , который 1-й в Store: Ext.define('DQM3.store.StatusComboMainStore', { extend : 'Ext.data.Store', model : 'DQM3.model.StatusComboModel', id : 'comboID', autoload:true, constructor: function(config) { Ext.apply(config, { proxy : { type : 'ajax', url : 'StatusServlet', reader : { type : 'json', root : 'rows' } } }); this.callParent([config]); } }); |
listeners: { render: function(){ this.setValue(1); } } |
Часовой пояс GMT +3, время: 22:57. |