LabKey Ext JS 4 JavaScript APIs | slangley | 2012-09-05 18:44 |
Status: Closed | ||
Thanks Nick. Here's an even more detailed Ext JS 4 question then. I have a proxy configured like so based on your code in the DataViewsPanel.js of the study module: proxy : { type : 'ajax', url : LABKEY.ActionURL.buildURL('query','selectRows.api'), extraParams : { schemaName : 'atlas_psl', queryName : this.gridQueryName, }, reader : { type : 'json', root : 'data' } }, This works but I want to modify the data returned from this query before it is rendered in the grid by adding an additional boolean column to each data row based on the contents of one of the returned data columns. That is, I'm going to take the value of one of the returned columns and execute another JavaScript function on it to generate a boolean true or false based on the characteristics of the the passed in value. How would you recommend I do this? Should I extend the Ext.data.reader.Json class and override the readRecords() function to throw in my code that generates this additional column? Should I add a listener on the 'load' event of the Ext.data.Store and place my code there? Or somewhere else? I assume whether I should I add my new boolean column to the Ext.data.Model used by the Proxy and Store would depend on the answer to the above. Thanks. Scott |
||