tom@1338: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
tom@1338:  * Software engineering by Intevation GmbH
tom@1338:  *
tom@1338:  * This file is Free Software under the GNU GPL (v>=3)
tom@1338:  * and comes with ABSOLUTELY NO WARRANTY! Check out
tom@1338:  * the documentation coming with IMIS-Labordaten-Application for details.
tom@1338:  */
tom@1338: 
tom@1338: /**
tom@1338:  * Combobox for type of Ortszuordnung
tom@1338:  */
tom@1338: Ext.define('Lada.view.widget.OrtszuordnungTyp' ,{
tom@1338:     extend: 'Lada.view.widget.base.ComboBox',
tom@1338:     alias: 'widget.ortszuordnungtyp',
tom@1338:     store: 'OrtszuordnungTyp',
tom@1338:     displayField: 'ortstyp',
tom@1338:     valueField: 'id',
tom@1338:     editable: this.editable || false,
tom@1338:     forceSelection: true,
tom@1338:     // Enable filtering of comboboxes
tom@1338:     autoSelect: false,
tom@1338:     queryMode: 'local',
tom@1338:     triggerAction: 'all',
tom@1338:     typeAhead: false,
tom@1338:     minChars: 0,
mkrambach@1339:     allowBlank: this.allowBlank,
tom@1338: 
tom@1338:     initComponent: function() {
tom@1338:         var i18n = Lada.getApplication().bundle;
tom@1338:         this.emptyText = i18n.getMsg('emptytext.ortszuordnungtyp');
tom@1338: 
tom@1338:         this.store = Ext.data.StoreManager.get('ortszuordnungtyp');
tom@1338:         if (!this.store) {
tom@1338:             this.store = Ext.create('Lada.store.OrtszuordnungTyp');
tom@1338:         }
tom@1338:         this.store.sort();
tom@1338:         this.callParent(arguments);
tom@1338:     }
tom@1338: });