Hi jratcliff,
Thank you very much for your help. It's working as you tried it. I am really greatfull for you kindness help. \:D/
I hope God will give you a present for helping me... :)
Once again, thanks...
Printable View
Hi jratcliff,
I extended the Panel object to write a custom widget. It is displaying the data properly. Then i applied the auto refresh functionality but it is not working.
Can you help me in solving this problem?
Here is my code
------------------
Code:Example.ux.widget.icare = Ext.extend(Ext.Panel, {
id : 'id-panel-icare',
title : 'Auto Refresh Example',
border : true,
initComponent : function() {
this.html = 'Loading data.........',
Example.ux.widget.icare.superclass.initComponent.apply(this, arguments);
},
onRender : function() {
//this.load(); // --this works fine.
this.getUpdater().startAutoRefresh(60, load, true);
Example.ux.widget.icare.superclass.onRender.apply(this, arguments);
},
load: function(config) {
var config = config || {};
Ext.apply(config, {
url:'/Dashboard/status?data=icare',
success: this.onLoad,
failure: this.onFailure,
scope: this
});
Ext.Ajax.request(config);
},
onLoad: function(response, opts) {
var json = Ext.decode(response.responseText);
var tpl = new Ext.Template(
'<p>Pending TR Count: {pendingTRCount}</p>'
);
tpl.overwrite(this.body, json[0]);
},
onFailure: function() {
Ext.Msg.alert('Fail', 'Error occured while getting iCARE pending records count.');
}
});
Ext.reg('icarepanel', Example.ux.widget.icare);
//8 Seconds Interval refresh for Grid - Working
var interval = setInterval(function() {
var store = Ext.StoreMgr.lookup('gridId');
tasksummary_store.reload();
}, 8000);