comparison 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
comparison
equal deleted inserted replaced
51:230bac063b0b 52:af418743e1f4
36 }, 36 },
37 editProbe: function(grid, record) { 37 editProbe: function(grid, record) {
38 console.log('Double click on ' + record.get('probeId')); 38 console.log('Double click on ' + record.get('probeId'));
39 // Create new window to edit the seletced record. 39 // Create new window to edit the seletced record.
40 var view = Ext.widget('probenedit'); 40 var view = Ext.widget('probenedit');
41 view.down('form').loadRecord(record); 41 //console.log(Ext.ModelManager.getModel('Lada.model.Probe'));
42 Ext.ModelManager.getModel('Lada.model.Probe').load(record.get('probeId'), {
43 success: function(record) {
44 view.down('form').loadRecord(record);
45 console.log("Loaded probe with ID " + record.getId()); //outputs ID
46 }
47 });
42 }, 48 },
43 updateProbe: function(button) { 49 updateProbe: function(button) {
44 console.log('Click save'); 50 console.log('Click save');
45 // We only have a reference to the button here but we really wnat to 51 // We only have a reference to the button here but we really wnat to
46 // get the form and the window. So first get the window and form and 52 // get the form and the window. So first get the window and form and

http://lada.wald.intevation.org