private final Element deco;
+ /** For internal use only. May be removed or replaced in the future. */
+ public boolean waitingForResponse;
+
private String currentStyle;
/**
*/
private boolean canSelectTab(final int tabIndex) {
Tab tab = tb.getTab(tabIndex);
- if (getApplicationConnection() == null || disabled) {
+ if (getApplicationConnection() == null || disabled
+ || waitingForResponse) {
return false;
}
if (!tab.isEnabledOnServer() || tab.isHiddenOnServer()) {
getRpcProxy().setSelected(tabKeys.get(tabIndex).toString());
+ waitingForResponse = true;
+
tb.getTab(tabIndex).focus(); // move keyboard focus to active tab
return true;
final String key = getState().tabs.get(i).key;
final boolean selected = key.equals(getState().selected);
if (selected) {
- getWidget().setActiveTabIndex(i);
+ getWidget().waitingForResponse = false;
getWidget().selectTab(i);
break;
}