SC_SNAPSHOT-2011-01-06/PowerEdition Deployment 2011-01-06
GWT 1.7.1
IE 7 Dev Console
Perhaps I'm not doing something correctly, but the TabSelected event is firing when there is no tab selected. Below I am simply assembling a TabSet but not explicitly selecting a Tab:
You can see the output of the Dev Console with my debug statements:
GWT 1.7.1
IE 7 Dev Console
Perhaps I'm not doing something correctly, but the TabSelected event is firing when there is no tab selected. Below I am simply assembling a TabSet but not explicitly selecting a Tab:
Code:
public MainEntryPoint() { } private TabSet tabSet; public void onModuleLoad() { HLayout layout = new HLayout(); layout.setWidth(300); layout.setHeight(200); layout.setMembersMargin(20); tabSet = new TabSet(); tabSet.setTabBarPosition(Side.TOP); tabSet.setWidth100(); tabSet.setHeight100(); tabSet.setTabBarThickness(22); Tab manager = new Tab("one"); Tab broker = new Tab("two"); Tab stock = new Tab("three"); Tab multi = new Tab("four"); Tab none = new Tab("none"); tabSet.addTab(manager); //0 tabSet.addTab(broker); //1 tabSet.addTab(stock); //2 tabSet.addTab(multi); //3 tabSet.addTab(none); //4 VLayout spacer1 = new VLayout(); spacer1.setWidth("10px"); tabSet.setTabBarControls(TabBarControls.TAB_SCROLLER, TabBarControls.TAB_PICKER); tabSet.addTabSelectedHandler(tabSetTabSelectedHandler); layout.addMember(tabSet); layout.draw(); } private TabSelectedHandler tabSetTabSelectedHandler = new TabSelectedHandler() { public void onTabSelected(TabSelectedEvent event) { GWT.log("TabSelectedHandler.onTabSelected:" + event.getTab().getTitle(), null); } };
Code:
[INFO] TabSelectedHandler.onTabSelected:one
Comment