comparison app/view/widget/Verwaltungseinheit.js @ 548:d47ee7439f44

Added new js files.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 06 Mar 2015 12:43:52 +0100
parents
children b94ff1bf6491
comparison
equal deleted inserted replaced
547:f172b35a3b92 548:d47ee7439f44
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */
8
9 /**
10 * Combobox for Verwaltungseinheit
11 */
12 Ext.define('Lada.view.widget.Verwaltungseinheit', {
13 extend: 'Lada.view.widget.base.ComboBox',
14 alias: 'widget.verwaltungseinheiten',
15 store: 'Verwaltungseinheiten',
16 displayField: 'bezeichnung',
17 valueField: 'id',
18 emptyText: 'Wählen Sie eine Verwaltungseinheit',
19 hideTrigger: true,
20 // Enable filtering of comboboxes
21 autoSelect: false,
22 queryMode: 'remote',
23 triggerAction: 'type',
24 typeAhead: false,
25 minChars: 2,
26
27 initComponent: function() {
28 this.store = Ext.data.StoreManager.get('verwaltungseinheiten');
29 if (!this.store) {
30 this.store = Ext.create('Lada.store.Verwaltungseinheiten');
31 }
32 this.callParent(arguments);
33 },
34 // This listener is used to load currently "selected" verwaltungseinheit.
35 // This is needed as without having this record the field would only
36 // display the raw value (id) of the verwaltungseinheit.
37 listeners: {
38 render: function(combo) {
39 combo.store.load({
40 id: this.getValue()
41 });
42 }
43 }
44 });

http://lada.wald.intevation.org