diff app/view/grid/Messmethoden.js @ 759:b7484c7da2d4

Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
author Dustin Demuth <dustin@intevation.de>
date Thu, 07 May 2015 10:55:44 +0200
parents b2fcbdc4969d
children 0e8d4178bb7e
line wrap: on
line diff
--- a/app/view/grid/Messmethoden.js	Wed May 06 16:24:23 2015 +0200
+++ b/app/view/grid/Messmethoden.js	Thu May 07 10:55:44 2015 +0200
@@ -80,7 +80,9 @@
                 if (!store) {
                     store = Ext.create('Lada.store.Messmethoden');
                 }
-               return value + " - " + store.findRecord('id', value, 0, false, false, true).get('messmethode');
+                store.load();
+                console.log(store);
+                return value + " - " + store.findRecord('id', value, 0, false, false, true).get('messmethode');
             },
             editor: {
                 xtype: 'combobox',
@@ -112,11 +114,14 @@
         else {
             this.store = Ext.create('Lada.store.MmtMessprogramm');
         }
-        this.store.load({
-            params: {
-                messprogrammId: this.recordId
-            }
-        });
+        // Only load the Store when a Record ID is Present
+        if (this.recordId) {
+            this.store.load({
+                params: {
+                    messprogrammId: this.recordId
+                }
+            });
+        }
     },
     setReadOnly: function(b) {
         if (b == true){

http://lada.wald.intevation.org