Mercurial > lada > lada-client
comparison app/view/widgets/Probenart.js @ 490:446e99cfd425
Updated views and controllers using the new model and stores.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 21:28:31 +0100 |
parents | e45f4df57938 |
children | 850ccfe5f3c4 |
comparison
equal
deleted
inserted
replaced
489:6056a7fd9aa2 | 490:446e99cfd425 |
---|---|
4 * This file is Free Software under the GNU GPL (v>=3) | 4 * This file is Free Software under the GNU GPL (v>=3) |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out | 5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
6 * the documentation coming with IMIS-Labordaten-Application for details. | 6 * the documentation coming with IMIS-Labordaten-Application for details. |
7 */ | 7 */ |
8 | 8 |
9 var probenartStore = Ext.create('Ext.data.Store', { | |
10 fields: ['probenartId', 'probenart'], | |
11 autoLoad: true, | |
12 proxy: { | |
13 type: 'ajax', | |
14 api: { | |
15 read: 'server/rest/probenart' | |
16 }, | |
17 reader: { | |
18 type: 'json', | |
19 root: 'data' | |
20 } | |
21 } | |
22 }); | |
23 | |
24 /** | 9 /** |
25 * Combobox for Probenart | 10 * Combobox for Probenart |
26 */ | 11 */ |
27 Ext.define('Lada.view.widgets.Probenart' ,{ | 12 Ext.define('Lada.view.widgets.Probenart' ,{ |
28 extend: 'Ext.form.ComboBox', | 13 extend: 'Ext.form.ComboBox', |
29 alias: 'widget.probenart', | 14 require: ['Lada.store.StaProbenarten'], |
30 store: probenartStore, | 15 alias: 'widget.probenart', |
31 displayField:'probenart', | 16 store: 'StaProbenarten', |
32 valueField: 'probenartId', | 17 displayField:'probenart', |
33 emptyText:'Wählen Sie eine Probenart', | 18 valueField: 'id', |
34 // Enable filtering of comboboxes | 19 emptyText:'Wählen Sie eine Probenart', |
35 autoSelect: false, | 20 // Enable filtering of comboboxes |
36 queryMode: 'local', | 21 autoSelect: false, |
37 triggerAction : 'all', | 22 queryMode: 'local', |
38 typeAhead: false, | 23 triggerAction : 'all', |
39 minChars: 0, | 24 typeAhead: false, |
25 minChars: 0, | |
40 initComponent: function() { | 26 initComponent: function() { |
27 this.store = Ext.data.StoreManager.get('StaProbenarten'); | |
28 if (!this.store) { | |
29 this.store = Ext.create('Lada.store.StaProbenarten'); | |
30 } | |
41 this.callParent(arguments); | 31 this.callParent(arguments); |
42 } | 32 } |
43 }); | 33 }); |