LABKEY.ext.Store Leo Dashevskiy  2012-05-31 16:45
Status: Closed
 
Thanks, Ben!

Couple of minutes before you posted your answer, I edited my question to include that it seems to me that neither load() nor reload() work properly.

Is your answer 100% and I should look for a buggy approach in my code?

So actually, here are my additional questions:

suppose load() does load from the db the new data properly
am I correct to think that the data retrieval is asynchronous?
as soon as the new data is available I would like to do something with it
am I correct to use the store's load event listener for that or am I missing something?

and more over is it even possible/correct to do something like:

storeTable.sql = 'new-SQL-statement-to-fetch-the-new-data';
?
seems like it is not working: if autoLoad is true and there is an init sql config on the store, then it does not get modified; if autoLoad is false, then seems like this sql config is not set by the statement above as the load() call results in the following error:

GET http://140.107.157.39:8080/labkey/query/Test%20Flow/executeSql.api?_dc=1338508670999&schemaName=flow&apiVersion=9.1 500 (Internal Server Error)

(this assuming I'm not goofing up somewhere...)