/** Select the tab, as if the normal BeforeSelectionHandler was invoked. */
@Override
public void selectTab() {
if (!this.isInitialized()) {
if (this.getInitializationEventHandler() != null) {
UnifiedEvent init = new UnifiedEvent(UnifiedEventType.INIT_EVENT);
this.getInitializationEventHandler().handleEvent(init);
}
this.markInitialized();
}
// The selected event handler is always called, even when initialize is also called.
// That way, the client doesn't need any special logic for the "selected first time" case.
if (this.getSelectedEventHandler() != null) {
UnifiedEvent selected = new UnifiedEvent(UnifiedEventType.SELECTED_EVENT);
this.getSelectedEventHandler().handleEvent(selected);
}
if (this.getHistoryToken() != null) {
History.newItem(this.getHistoryToken(), false);