mstanko@1107: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
mstanko@1107:  * Software engineering by Intevation GmbH
mstanko@1107:  *
mstanko@1107:  * This file is Free Software under the GNU GPL (v>=3)
mstanko@1107:  * and comes with ABSOLUTELY NO WARRANTY! Check out
mstanko@1107:  * the documentation coming with IMIS-Labordaten-Application for details.
mstanko@1107:  */
mstanko@1107: 
mstanko@1107: /**
mstanko@1107:  * Combobox for MessprogrammLand
mstanko@1107:  */
mstanko@1107: Ext.define('Lada.view.widget.MessprogrammLand', {
mstanko@1107:     extend: 'Lada.view.widget.base.ComboBox',
mstanko@1107:     alias: 'widget.messprogrammland',
mstanko@1107:     store: 'messprogrammkategorie',
mstanko@1116:     displayField: 'id',
mstanko@1107:     valueField: 'id',
mstanko@1116:     emptyText: 'Wählen Sie ein Landesmessprogramm',
mstanko@1116:     editable: this.editable || false,
mstanko@1116:     forceSelection: true,
mstanko@1107:     // Enable filtering of comboboxes
mstanko@1116:     autoSelect: false,
mstanko@1107:     queryMode: 'local',
mstanko@1107:     triggerAction: 'all',
mstanko@1116:     typeAhead: false,
mstanko@1107:     minChars: 0,
mstanko@1116:     tpl: Ext.create("Ext.XTemplate",
mstanko@1116:         '<tpl for="."><div class="x-combo-list-item  x-boundlist-item" >' +
mstanko@1116:             '{mplId} - {bezeichnung}</div></tpl>'),
mstanko@1116:     displayTpl: Ext.create('Ext.XTemplate',
mstanko@1116:          '<tpl for=".">{mplId} - {bezeichnung}</tpl>'),
mstanko@1107: 
mstanko@1107:     initComponent: function() {
mstanko@1107:         this.store = Ext.data.StoreManager.get('messprogrammkategorie');
mstanko@1107:         if (!this.store) {
mstanko@1107:             this.store = Ext.create('Lada.store.MessprogrammKategorie');
mstanko@1107:         }
mstanko@1107:         else {
mstanko@1107:             this.store.clearFilter();
mstanko@1107:         }
mstanko@1107:         this.callParent(arguments);
mstanko@1107:     }
mstanko@1107: });