Ext.ns('Application');
 
Application.VbnCombo = Ext.extend(Ext.form.ComboBox, {
	name: 'virtualnetwork_id',
	fieldLabel: 'ВБН',
	mode: 'remote',
	triggerAction: 'all',
	allowBlank: false,
	editable: false,
	forceSelection: true,
	displayField:'title',
	hideTrigger:true,
	hiddenName:'virtualnetwork_id',
	valueField: 'id',
	
	initComponent : function() {
		Ext.apply(this, {
			store: new Ext.data.Store({
				proxy: new Ext.data.HttpProxy({
        			url: 'virtualnetwork/list',
        			method: 'GET'
				}),
        		baseParams:{format: 'json'},
				reader: new Ext.data.JsonReader({   
        			fields: ['id', 'title'],
        			root: 'rows'
				})
		    })
	    });
        // super
		Application.VbnCombo.superclass.initComponent.call(this);
    }
});
 
Ext.reg('vbncombo', Application.VbnCombo);