paul drussel
unread,Feb 12, 2009, 11:38:16 AM2/12/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Hi,
I've started migrating my GWT app to 1.6 and would like some help on
how to implement the BeforeSelectionHandler for a TabPanel.
I need to run a method for the widget associated with the tab selected
before the tab is selected.
In essence, the previous code looked like this:
public class CharBurner implements TabListener {
private TabPanel tabpanel = new TabPanel();
public CBTab charpanel = new CBTab();
public CBTab summarypanel = new CBTab();
public CharBurner() {
tabpanel.add(charpanel, "Character");
tabpanel.add(summarypanel, "Summary");
tabpanel.addTabListener(this);
}
public boolean onBeforeTabSelected(SourcesTabEvents sender, int
tabIndex) {
((CBTab) tabpanel.getWidget(tabIndex)).refresh();
return true;
}
}
How would this be implemented using the new BeforeSelectionHandler /
BeforeSelectionEvent ?
Thanks in advance,
Paul