I am using the Store and XmlReader to print some content to my template and I am facing a weird issue. Before I explain please go thru this code snippet.
Code:
var uplPrevStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
method:'post',
url:'/global/provider/nodec/serveContent.action'
}),
reader:prevXmlReader
});
uplPrevStore.load({
params:{outputType:'xml',env:'sandbox', contentId:record.data.sandboxContentId},
callback:function(rec,x,y){
recordData.content = rec[0].data.base64content;
recordData.mime = rec[0].data.mime;
}
});
var uplPrevStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
method:'post',
url:'/getContent.action'
}),
reader:prevXmlReader
});
uplPrevStore.load({
params:{outputType:'xml',env:'dev', contentId:record.data.contentId},
callback:function(rec,x,y){
recordData.content = rec[0].data.base64content;
recordData.mime = rec[0].data.mime;
}
});
CExplorer.getTemplate().overwrite(this.preview.body, recordData);
In the callback function I am getting the records[] array and from the first record i need to get the content and mime and setting it to another recordData object. Later I am applying the "recordData" object to a template.
The issue is, the values are not getting populated within callback function. But if i set breakpoint within the callback loop the content is getting populated and the code works without an issue. If I remove the breakpoint, its not getting populated. I am not sure whats special when I set the breakpoint...
Another weird thing is, If I set the break point at "CExplorer.getTemplate()....." line, values are not getting populated from the record.
I would appreciate your help.
P.S: I posted 3-4 questions for the past 3 days regarding different issues but none of them got answered. I used to get faster replies from the community but i noticed that its not anymore.
Jack, I hope you can listen to this question and possibly reply.
Thanks,
Tham.