Not sure what I am doing wrong here, but let me setup the scenario.
In the beginning, a store(resultsStore) is being populated with data and being displayed via a function call.
Now, an intermediate step of obtaining more data by way of another store is needed and passing both sets to the original function.
I have tried many variations of the below, but the two datasets do not seem to be passed to the updateLeftPanel function, the first one is there fine, the second says "undefined". Anything obvious I am missing?
resultsStore.load({
params: {
'certid' : certId
},
callback: function(record,operation,success){
updateRightPanel(record[0].data); // code not shown,works fine
//updateLeftPanel(record[0].data); // original call
loadCriteriaStore(record[0].data); // new call
}
});
function loadCriteriaStore(data)
{
criteriaStore.load({
params: {
'edition' : data['Edition']
},
callback: function(record,operation,success,data){
updateLeftPanel(data,record[0].data);
// orig data first, new dataset second
}
});
}
function updateLeftPanel(data, dataa){
// code here
dataa object still unpopulated
}