Mercurial > lada > lada-client
annotate app/view/widgets/Messmethode.js @ 261:1375ff0f248d
Issue50. Show ID an text in combobox.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 26 Jul 2013 10:12:58 +0200 |
parents | 70a1b5962930 |
children | 852dc338894e |
rev | line source |
---|---|
178
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
1 // Combobox for Messmethode |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
2 var mmtStore = Ext.create('Ext.data.Store', { |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
3 fields: ['mmtId', 'messmethhode'], |
260
70a1b5962930
Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
178
diff
changeset
|
4 sorters: [{ |
70a1b5962930
Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
178
diff
changeset
|
5 property: 'mmtId', |
70a1b5962930
Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
178
diff
changeset
|
6 }], |
178
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
7 proxy: { |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
8 type: 'ajax', |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
9 api: { |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
10 read: 'server/rest/messmethode' |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
11 }, |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 reader: { |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 type: 'json', |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
14 root: 'data' |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 } |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 } |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 }); |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 Ext.define('Lada.view.widgets.Messmethode' ,{ |
261
1375ff0f248d
Issue50. Show ID an text in combobox.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
260
diff
changeset
|
20 tpl: '<tpl for="."><div class="x-combo-list-item" >{mmtId} - {messmethhode}</div></tpl>', |
178
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
21 extend: 'Ext.form.ComboBox', |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
22 alias: 'widget.messmethode', |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
23 store: mmtStore, |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
24 displayField:'messmethhode', |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 valueField: 'mmtId', |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 emptyText:'Wählen Sie eine Messmethode', |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 initComponent: function() { |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
28 this.callParent(arguments); |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
29 } |
c53f3110852e
Added Messmethode.js
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
30 }); |