PDA

View Full Version : ExtGWT Tanpanel activate already created tabItem



k_paramesh82
19 Mar 2011, 11:02 AM
Hii All,

I have 2 label,when click on it i created two TabItems in TabPanel.if i click any one link again i have show that TabItem(its already created) if its not showing,pls help in it


Thanks

daddieke
20 Mar 2011, 5:25 AM
You should have a reference to the TabItems you opened. That allows you to check if a specific TabItem is already open. If not, open it. In any case select it.

Code can be something like :



TabItem tabItem = tabPanel.getItemByItemId(key);
if (tabItem == null) {
// create tabItem with its content here ...
tabItem.setItemId(key);
tabPanel.add(tabItem);
}
tabPanel.setSelection(tabItem);

k_paramesh82
20 Mar 2011, 9:23 AM
Thanks its working