Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/view/messwerte/List.js Fri Oct 31 21:11:25 2014 +0100 +++ b/app/view/messwerte/List.js Fri Oct 31 21:28:31 2014 +0100 @@ -11,6 +11,7 @@ */ Ext.define('Lada.view.messwerte.List' ,{ extend: 'Ext.grid.Panel', + require: ['Lada.store.StaMesseinheit'], alias: 'widget.messwertelist', store: 'Messwerte', viewConfig: { @@ -58,16 +59,21 @@ header: 'Messgröße', dataIndex: 'messgroesseId', renderer: function(value) { - var store = Ext.getStore('Messgroessen'); - return store.findRecord('messgroesseId', value).get('messgroesse'); + var store = Ext.getStore('StaMessgroessen'); + return store.findRecord('id', value).get('messgroesse'); } }, { header: 'Messeinheit', dataIndex: 'mehId', renderer: function(value) { - var store = Ext.getStore('Messeinheit'); - return store.findRecord('mehId', value).get('einheit'); + console.log('einheit: ' + value); + var store = Ext.data.StoreManager.get('StaMesseinheiten'); +/* if (!store) { + store = Ext.create('Lada.store.StaMesseinheiten'); + } +*/ console.log(store.getById(value)); + return store.findRecord('id', value).get('einheit'); } }, {