diff app/view/orte/List.js @ 496:d07e5086a64b

Moved stammdaten stores to app.js and load them via storemanager.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 10:35:35 +0100
parents 850ccfe5f3c4
children 7c0653e8d9f7
line wrap: on
line diff
--- a/app/view/orte/List.js	Mon Nov 03 12:12:24 2014 +0100
+++ b/app/view/orte/List.js	Thu Nov 06 10:35:35 2014 +0100
@@ -13,7 +13,6 @@
     extend: 'Ext.grid.Panel',
     alias: 'widget.ortelist',
 
-    store: 'Orte',
     viewConfig: {
         maxHeight: 350,
         emptyText: 'Keine Orte gefunden.',
@@ -51,18 +50,17 @@
             header: 'Staat',
             dataIndex: 'ortId',
             renderer: function(value) {
-                var store = Ext.getStore('StaOrte');
-                var staaten = Ext.getStore('StaStaaten');
-                console.log('staatenstore: ' + staaten);
-                console.log('the staat: ' + store.getById(value).get("staatId"));
-                var record = staaten.getById(store.getById(value).get('staatId'));
+                var store = Ext.data.StoreManager.get('staOrte');
+                var staaten = Ext.data.StoreManager.get('staStaaten');
+                var record =
+                    staaten.getById(store.getById(value).get('staatId'));
                 return record.get('staatIso');
             }
         }, {
             header: 'Gemeineschlüssel',
             dataIndex: 'ortId',
             renderer: function(value) {
-                var store = Ext.getStore('StaOrte');
+                var store = Ext.data.StoreManager.get('staOrte');
                 console.log('value ' + value);
                 var record = store.getById(value);
                 return record.get('gemId');
@@ -72,8 +70,9 @@
             dataIndex: 'ortId',
             flex: 1,
             renderer: function(value) {
-                var store = Ext.getStore('StaOrte');
-                var gemeinden = Ext.getStore('StaVerwaltungseinheiten');
+                var store = Ext.data.StoreManager.get('staOrte');
+                var gemeinden =
+                    Ext.data.StoreManager.get('staVerwaltungseinheiten');
                 var record = store.getById(value);
                 var gemid = record.get('gemId');
                 var record2 = gemeinden.getById(gemid);
@@ -83,7 +82,7 @@
             header: 'Messpunkt',
             dataIndex: 'ortId',
             renderer: function(value) {
-                var store = Ext.getStore('StaOrte');
+                var store = Ext.getStore('staOrte');
                 var record = store.getById(value);
                 return record.get('bezeichnung');
             }

http://lada.wald.intevation.org