changeset 224:5e056c5edf9a

Fixed loading stores when editing Messung.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 16 Jul 2013 13:56:38 +0200
parents 53e50427888b
children d27017394c8f
files app/controller/Messungen.js
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Messungen.js	Tue Jul 16 11:36:38 2013 +0200
+++ b/app/controller/Messungen.js	Tue Jul 16 13:56:38 2013 +0200
@@ -50,30 +50,29 @@
     },
     editMessung: function(grid, record) {
         console.log('Editing Messung');
-        var view = Ext.widget('messungencreate', {model: record});
-        console.log("Loaded Messung with ID " + record.getId()); //outputs ID
-
         var kstore = this.getMKommentareStore();
         kstore.load({
             params: {
-                probeId: probeId,
+                probeId: record.get('probeId'),
                 messungsId: record.get('messungsId')
             }
         });
         var sstore = this.getStatusStore();
         sstore.load({
             params: {
-                probeId: probeId,
+                probeId: record.get('probeId'),
                 messungsId: record.get('messungsId')
             }
         });
-        var mstore = this.getMessungwerteStore();
+        var mstore = this.getMesswerteStore();
         mstore.load({
             params: {
-                probeId: probeId,
+                probeId: record.get('probeId'),
                 messungsId: record.get('messungsId')
             }
         });
+        var view = Ext.widget('messungencreate', {model: record});
+        console.log("Loaded Messung with ID " + record.getId()); //outputs ID
     },
     deleteMessung: function(button) {
         // Get selected item in grid

http://lada.wald.intevation.org