PDA

View Full Version : List auto refresh



magnusbilling
7 Oct 2013, 7:12 AM
Hello, I have a system in EXTJS 4.1 with Yiiframework.

I want refresh automatically a list. Only if the tab is active.

Administrator panel : http://177.70.1.166/billing/
Username: root
Password: magnus

Mene Calls Online

Best regards

Ary_Fortune
7 Oct 2013, 10:28 AM
May be in 'afterrecordchange' or 'viewready' event, you can check the state of your tab and do a gridObj.store.loaddata(....Grid response). to load/Refresh your grid.

magnusbilling
7 Oct 2013, 1:30 PM
How I check if the tab is active?

Best regards

existdissolve
7 Oct 2013, 5:16 PM
What's the event which triggers the refresh? The tab becoming active? A timer? Both? I would hook in some events to your controller that determine when the refresh should occur, and then in your handler you can check if the tab is active (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.tab.Panel-method-getActiveTab ... compare to the target tab) and then reload the store