PDA

View Full Version : Panel Questions & Problems



kenITR
14 Nov 2007, 12:49 PM
Hello:

1) I have a page that loads up information for different entities with a lookup in the North region . Half of the page consists of a region with 5 tabbed panels. Each panel loads up a lot of data. To keep the trips to the server at a minimum, I'd like to load up the non-default tab info only when the tab is opened. (Most of the time the default panel is all that will be viewed.) Is this possible with 1.1? With 2.0? As far as I can tell, the panels are activated when they are created not when they are viewed.

2) Further complicating this is that if I have a tab open and I load up info for a different entity, the currently visible tab will have to be refreshed. Is there a way to know which tab is currently open so I know which one to reload?

3) I have a grid on one panel. The dirty data indicator (red triangle in upper left) stays lit when I reload the datastore when I'm loading a new entity. This is misleading. This does not happen with a similar implementation not in a panel.

Any help would be greatly appreciated.

Thanks,

Ken

fay
14 Nov 2007, 2:06 PM
1. Certainly is possible with 1.1. Add a handler for the tab panel item's activate (http://extjs.com/deploy/ext/docs/output/Ext.TabPanelItem.html#event-activate) event. For example, from the TabPanel (http://extjs.com/deploy/ext/docs/output/Ext.TabPanel.html) docs:


// set up the UpdateManager
var tab2 = jtabs.addTab("jtabs-2", "Ajax Tab 1");
var updater = tab2.getUpdateManager();
updater.setDefaultUrl("ajax1.htm");
tab2.on('activate', updater.refresh, updater, true);

2. getActiveTab (http://extjs.com/deploy/ext/docs/output/Ext.TabPanel.html#getActiveTab)

3. Not 100% sure about this one. Try:


grid.getView().refresh();

kenITR
14 Nov 2007, 6:56 PM
Ah-hah! TabPanel. I've been using the tabPosition on the borderlayout. I haven't worked with the tab panel or update manager.

Thanks a bunch!

Ken