Ext.define("App.view.GroupCombo", {
    extend: "Ext.form.field.ComboBox",
    alias: "widget.groupCombo",

    fieldLabel: App.localeRes("Group"),
    name: "groupId",
    selectOnFocus: true,
    forceSelection: true,
    valueField: "id",
    displayField: "name",
    queryMode: "remote",
    typeAhead: true,
    tpl: '<tpl for="."><div class="x-boundlist-item">{name}</div></tpl>',
    displayTpl: '<tpl for=".">{name}</tpl>',
    params: {},

    initComponent: function() {
        var me = this;
        if (!me.store)
            me.store = Ext.create("App.store.GroupStore", {
                extraParams: me.params
            });

        me.callParent();
    }
});
