Mercurial > lada > lada-client
comparison app/controller/Filter.js @ 976:3c770fc7cf19 stammdatengrids
Added a variable which makes it possible to detect if a grid is dynamic
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Wed, 02 Dec 2015 17:53:20 +0100 |
parents | fb99332bb48e |
children | c6ae0aadb634 |
comparison
equal
deleted
inserted
replaced
975:fb99332bb48e | 976:3c770fc7cf19 |
---|---|
290 // Find the store or create a new one. | 290 // Find the store or create a new one. |
291 var store = Ext.StoreManager.lookup(sname); | 291 var store = Ext.StoreManager.lookup(sname); |
292 if (!store) { | 292 if (!store) { |
293 store = Ext.create(sname); | 293 store = Ext.create(sname); |
294 } | 294 } |
295 console.log(store); | |
296 if (store) { | 295 if (store) { |
297 store.addListener('beforeload', this.loadingAnimationOn, resultGrid); | 296 store.addListener('beforeload', this.loadingAnimationOn, resultGrid); |
298 store.addListener('load', this.loadingAnimationOff, resultGrid); | 297 store.addListener('load', this.loadingAnimationOff, resultGrid); |
298 | |
299 resultGrid.setStore(store); | 299 resultGrid.setStore(store); |
300 resultGrid.setupColumns(this.displayFields); | 300 //TODO: Check if this is still necessary, as a Grid exists |
301 // for each Type. | |
302 | |
303 if (resultGrid.isDynamic) { | |
304 //only the dynamic resultgrid can and needs to do the following: | |
305 resultGrid.setupColumns(this.displayFields); | |
306 } | |
307 | |
301 resultGrid.getStore().proxy.extraParams = searchParams; | 308 resultGrid.getStore().proxy.extraParams = searchParams; |
302 resultGrid.getStore().load(); | 309 resultGrid.getStore().load(); |
303 resultGrid.show(); | 310 resultGrid.show(); |
304 } | 311 } |
305 }, | 312 }, |