Mercurial > lada > lada-client
comparison app/view/messwerte/List.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 | debfcc7713e3 |
children | 850ccfe5f3c4 |
comparison
equal
deleted
inserted
replaced
489:6056a7fd9aa2 | 490:446e99cfd425 |
---|---|
9 /* | 9 /* |
10 * Grid to list Messwerte | 10 * Grid to list Messwerte |
11 */ | 11 */ |
12 Ext.define('Lada.view.messwerte.List' ,{ | 12 Ext.define('Lada.view.messwerte.List' ,{ |
13 extend: 'Ext.grid.Panel', | 13 extend: 'Ext.grid.Panel', |
14 require: ['Lada.store.StaMesseinheit'], | |
14 alias: 'widget.messwertelist', | 15 alias: 'widget.messwertelist', |
15 store: 'Messwerte', | 16 store: 'Messwerte', |
16 viewConfig: { | 17 viewConfig: { |
17 maxHeight: 350, | 18 maxHeight: 350, |
18 emptyText: 'Keine Messwerte gefunden.', | 19 emptyText: 'Keine Messwerte gefunden.', |
56 {header: 'Messfehler', dataIndex: 'messfehler'}, | 57 {header: 'Messfehler', dataIndex: 'messfehler'}, |
57 { | 58 { |
58 header: 'Messgröße', | 59 header: 'Messgröße', |
59 dataIndex: 'messgroesseId', | 60 dataIndex: 'messgroesseId', |
60 renderer: function(value) { | 61 renderer: function(value) { |
61 var store = Ext.getStore('Messgroessen'); | 62 var store = Ext.getStore('StaMessgroessen'); |
62 return store.findRecord('messgroesseId', value).get('messgroesse'); | 63 return store.findRecord('id', value).get('messgroesse'); |
63 } | 64 } |
64 }, | 65 }, |
65 { | 66 { |
66 header: 'Messeinheit', | 67 header: 'Messeinheit', |
67 dataIndex: 'mehId', | 68 dataIndex: 'mehId', |
68 renderer: function(value) { | 69 renderer: function(value) { |
69 var store = Ext.getStore('Messeinheit'); | 70 console.log('einheit: ' + value); |
70 return store.findRecord('mehId', value).get('einheit'); | 71 var store = Ext.data.StoreManager.get('StaMesseinheiten'); |
72 /* if (!store) { | |
73 store = Ext.create('Lada.store.StaMesseinheiten'); | |
74 } | |
75 */ console.log(store.getById(value)); | |
76 return store.findRecord('id', value).get('einheit'); | |
71 } | 77 } |
72 }, | 78 }, |
73 { | 79 { |
74 header: 'Grenzwertüberschreitung', | 80 header: 'Grenzwertüberschreitung', |
75 dataIndex: 'grenzwertueberschreitung', | 81 dataIndex: 'grenzwertueberschreitung', |