public void onBeforeSelection(BeforeSelectionEvent<Integer> bse) { buttonClicked = true; TabBar tb = (TabBar) bse.getSource(); cSelIdx = tb.getSelectedTab(); int selIdx = bse.getItem(); TabHolder th = findTab(selIdx, tb); if (!th.button.isUseDropdown()) { th.button.activate(); bse.cancel(); } else { dropdown.clearHeaderBar(); } }