# HG changeset patch
# User Torsten Irländer <torsten.irlaender@intevation.de>
# Date 1369659599 -7200
# Node ID af418743e1f4505900b02c922dcccb5903121932
# Parent  230bac063b0b62ffb3ec8824983ea9afa257cd8e
Load Proben form with detailed version of the proben record.

diff -r 230bac063b0b -r af418743e1f4 app/controller/Proben.js
--- a/app/controller/Proben.js	Mon May 27 14:59:23 2013 +0200
+++ b/app/controller/Proben.js	Mon May 27 14:59:59 2013 +0200
@@ -38,7 +38,13 @@
         console.log('Double click on ' + record.get('probeId'));
         // Create new window to edit the seletced record.
         var view = Ext.widget('probenedit');
-        view.down('form').loadRecord(record);
+        //console.log(Ext.ModelManager.getModel('Lada.model.Probe'));
+        Ext.ModelManager.getModel('Lada.model.Probe').load(record.get('probeId'), {
+            success: function(record) {
+                view.down('form').loadRecord(record);
+                console.log("Loaded probe with ID " + record.getId()); //outputs ID
+            }
+        });
     },
     updateProbe: function(button) {
         console.log('Click save');