Mercurial > lada > lada-client
comparison app/view/grid/FilterResult.js @ 751:704bb359c0fe
dynamically exchange the store of the resultfiltergrid
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 28 Apr 2015 16:03:59 +0200 |
parents | 7b6467edfdfc |
children | 4dd0c645ea8b |
comparison
equal
deleted
inserted
replaced
750:561ade69980e | 751:704bb359c0fe |
---|---|
11 */ | 11 */ |
12 Ext.define('Lada.view.grid.FilterResult', { | 12 Ext.define('Lada.view.grid.FilterResult', { |
13 extend: 'Ext.grid.Panel', | 13 extend: 'Ext.grid.Panel', |
14 alias: 'widget.filterresultgrid', | 14 alias: 'widget.filterresultgrid', |
15 | 15 |
16 store: 'ProbenList', | 16 store: null, //'ProbenList', |
17 | 17 |
18 multiSelect: true, | 18 multiSelect: true, |
19 | 19 |
20 viewConfig: { | 20 viewConfig: { |
21 emptyText: 'Keine Proben gefunden.', | 21 emptyText: 'Keine Proben gefunden.', |
37 }, { | 37 }, { |
38 text: 'Export', | 38 text: 'Export', |
39 icon: 'resources/img/svn-update.png', | 39 icon: 'resources/img/svn-update.png', |
40 action: 'export' | 40 action: 'export' |
41 }] | 41 }] |
42 }, { | |
43 xtype: 'pagingtoolbar', | |
44 dock: 'bottom', | |
45 store: this.store, | |
46 displayInfo: true | |
47 }]; | 42 }]; |
48 this.columns = []; | 43 this.columns = []; |
49 this.callParent(arguments); | 44 this.callParent(arguments); |
50 }, | 45 }, |
51 | 46 |
47 /** | |
48 * This sets the Store of the FilterResultGrid | |
49 */ | |
50 setStore: function(store){ | |
51 this.removeDocked(Ext.getCmp('ptbar'), true); | |
52 this.reconfigure(store); | |
53 this.addDocked([{ | |
54 xtype: 'pagingtoolbar', | |
55 id: 'ptbar', | |
56 dock: 'bottom', | |
57 store: store, | |
58 displayInfo: true | |
59 }]); | |
60 }, | |
52 /** | 61 /** |
53 * Setup columns of the Grid dynamically based on a list of given cols. | 62 * Setup columns of the Grid dynamically based on a list of given cols. |
54 * The function is called from the {@link Lada.controller.Sql#selectSql | 63 * The function is called from the {@link Lada.controller.Sql#selectSql |
55 * select sql event} | 64 * select sql event} |
56 */ | 65 */ |