Mercurial > lada > lada-client
diff app/view/orte/List.js @ 490:446e99cfd425
Updated views and controllers using the new model and stores.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 21:28:31 +0100 |
parents | debfcc7713e3 |
children | 850ccfe5f3c4 |
line wrap: on
line diff
--- a/app/view/orte/List.js Fri Oct 31 21:11:25 2014 +0100 +++ b/app/view/orte/List.js Fri Oct 31 21:28:31 2014 +0100 @@ -23,6 +23,10 @@ }, probeId: null, initComponent: function() { + this.store = Ext.data.StoreManager.get('Orte'); + if (!this.store) { + this.store = Ext.create('Lada.store.Orte'); + } this.dockedItems = [ { xtype: 'toolbar', @@ -51,8 +55,10 @@ header: 'Staat', dataIndex: 'ortId', renderer: function(value) { - var store = Ext.getStore('Ortedetails'); - var staaten = Ext.getStore('Staaten'); + 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')); return record.get('staatIso'); } @@ -62,7 +68,8 @@ header: 'Gemeineschlüssel', dataIndex: 'ortId', renderer: function(value) { - var store = Ext.getStore('Ortedetails'); + var store = Ext.getStore('StaOrte'); + console.log('value ' + value); var record = store.getById(value); return record.get('gemId'); } @@ -73,11 +80,11 @@ dataIndex: 'ortId', flex: 1, renderer: function(value) { - var store = Ext.getStore('Ortedetails'); - var gemeinden = Ext.getStore('Verwaltungseinheiten'); + var store = Ext.getStore('StaOrte'); + var gemeinden = Ext.getStore('StaVerwaltungseinheiten'); var record = store.getById(value); var gemid = record.get('gemId'); - var record2 = gemeinden.findRecord("gemId", gemid); + var record2 = gemeinden.getById(gemid); return record2.get('bezeichnung'); } @@ -86,7 +93,7 @@ header: 'Messpunkt', dataIndex: 'ortId', renderer: function(value) { - var store = Ext.getStore('Ortedetails'); + var store = Ext.getStore('StaOrte'); var record = store.getById(value); return record.get('bezeichnung'); }