diff app/controller/Proben.js @ 52:af418743e1f4

Load Proben form with detailed version of the proben record.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 27 May 2013 14:59:59 +0200
parents 230bac063b0b
children 73bc17de6ff2
line wrap: on
line diff
--- 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');

http://lada.wald.intevation.org