LabKey Ext JS 4 JavaScript APIs | slangley | 2012-09-07 13:59 |
Status: Closed | ||
Hi Ben, I tried overriding the reader and I think that would have worked except for my particular requirements. The function I use to generate a boolean on one of the returned fields needs to make another Ajax request to the server, in particular, the LABKEY.Security.getContainers() function. So I need for that function to finish and pass control to a callback before the reader.readRecords(data) returns its results. Unfortanately, reader.readRecords(data) doesn't want to wait around for that callback to finish. Perhaps if I used the "batching" mechanism of the Ext4 Proxy class I could have made it work there, but that looked a bit complicated. So what I ended up doing was overriding the private onProxyLoad(operation) function of Ext.data.Store and deferred the execution of most of its statements to occur in the callback of my invocation of the LABKEY.Security.getContainers() function, after first modifying the passed-in records. If you have more suggestions, let me know. Thanks. Scott |
||