diff app/view/zusatzwerte/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/zusatzwerte/List.js	Fri Oct 31 21:11:25 2014 +0100
+++ b/app/view/zusatzwerte/List.js	Fri Oct 31 21:28:31 2014 +0100
@@ -45,13 +45,13 @@
         this.columns = [
             {
                 header: 'PZW-ID',
-                dataIndex: 'pzsId'
+                dataIndex: 'id'
             },
             {
                 header: 'PZW-Größe',
                 dataIndex: 'pzsId',
                 renderer: function(value) {
-                    var store = Ext.getStore('Probenzusatzwerte');
+                    var store = Ext.getStore('StaProbenzusaetze');
                     var record = store.getById(value);
                     return record.get('beschreibung');
                 },
@@ -59,7 +59,7 @@
             },
             {
                 header: 'Messwert',
-                dataIndex: 'pzsId',
+                dataIndex: 'id',
                 renderer: function(value) {
                     var store = Ext.getStore('Zusatzwerte');
                     var record = store.getById(value);
@@ -77,10 +77,11 @@
                 header: 'Maßeinheit',
                 dataIndex: 'pzsId',
                 renderer: function(value) {
-                    var zstore = Ext.getStore('Probenzusatzwerte');
-                    var mstore = Ext.getStore('Messeinheit');
+                    var zstore = Ext.getStore('StaProbenzusaetze');
+                    var mstore = Ext.getStore('StaMesseinheiten');
+                    console.log('store: ' + mstore);
                     var mehId = zstore.getById(value).get('mehId');
-                    var record = mstore.findRecord('mehId', mehId);
+                    var record = mstore.findRecord('id', mehId);
                     return record.get('einheit');
                 }
             }

http://lada.wald.intevation.org