PDA

View Full Version : How can we access data from one tab to other tab?



pkg1
14 Sep 2010, 9:13 AM
Hi,

I am newbie in this forum as well as tool. I would greatly appreciate if you can help me for the following issues:

1. How can we transfer data from one tab to other?
2. How can we hide/show the tab using ext?

Thanks,
PKG.

darthwes
14 Sep 2010, 9:41 AM
What are you transfering from one tab to the other? Some keys for a query? Are you guaranteed that the first panel has been rendered and loaded with the data you want every time the user goes to some other tab?

You can enable/disabled tab panels. Does anyone know how to hide panels in a tab panel? I think you'd have to do a remove on the panel and hold it somewhere temporarily if your intent is to "unhide" it later. Not sure if there's code in Ext to hide individual panels within a tab panel.

sideeque
14 Sep 2010, 12:52 PM
For example, you can get the Form Panel of the other tab by providing the id (ex:- tab1) of the tab


var tabRef = Ext.ComponentMgr.get('tab1');
var formRef = tabRef.getComponent("tab1Form").form;

Once you get the FormPanel reference you can do anything on that tabs Form Panel elements.


To disable the tab, just try by formRef.setDisabled(true) or formRef.disable()