Mercurial > lada > lada-client
diff app/controller/Sql.js @ 241:4ca858026191
If the user selects a search query add call setupColumns method to dynamically
add columns to the table as defined in the searach query.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 23 Jul 2013 11:31:47 +0200 |
parents | 78134e20e62d |
children | c5d7fae5997a |
line wrap: on
line diff
--- a/app/controller/Sql.js Tue Jul 23 11:30:57 2013 +0200 +++ b/app/controller/Sql.js Tue Jul 23 11:31:47 2013 +0200 @@ -30,6 +30,7 @@ console.log('The panel was rendered'); }, selectSql: function(element, record, index) { + var result = Ext.getCmp('result'); var selection = element.getValue() - 1; console.log('Selected SQL ' + selection); for (var i = 0; i < queries.length; ++i) { @@ -39,6 +40,8 @@ var toShow = Ext.getCmp(queries[selection]); var buttons = Ext.getCmp('SearchBtnPanel'); this.reset(); + var displayFields = record[0].data.fields + result.setupColumns(displayFields); toShow.show(); buttons.show(); },