diff --git a/gwtp-core/gwtp-mvp-client/src/main/java/com/gwtplatform/mvp/client/TabContainerPresenter.java b/gwtp-core/gwtp-mvp-client/src/main/java/com/gwtplatform/mvp/client/TabContainerPresenter.java index 7e7885e165..84957b97c8 100644 --- a/gwtp-core/gwtp-mvp-client/src/main/java/com/gwtplatform/mvp/client/TabContainerPresenter.java +++ b/gwtp-core/gwtp-mvp-client/src/main/java/com/gwtplatform/mvp/client/TabContainerPresenter.java @@ -19,6 +19,8 @@ import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.GwtEvent.Type; import com.google.web.bindery.event.shared.EventBus; +import com.gwtplatform.mvp.client.presenter.slots.IsSlot; +import com.gwtplatform.mvp.client.presenter.slots.LegacySlotConvertor; import com.gwtplatform.mvp.client.proxy.Proxy; import com.gwtplatform.mvp.client.proxy.RevealContentHandler; import com.gwtplatform.mvp.client.proxy.TabContentProxy; @@ -210,7 +212,12 @@ public Tab addTab(final TabContentProxy tabProxy) { @Override public void setInSlot(Object slot, PresenterWidget content) { - super.setInSlot(slot, content); + setInSlot(LegacySlotConvertor.convert(slot), content); + } + + @Override + public > void setInSlot(IsSlot slot, T child) { + super.setInSlot(slot, child); // TODO: Consider switching this to an event bus based mechanism where the // child presenter fires an event when it is revealed and the parent highlights the tab. @@ -218,7 +225,7 @@ public void setInSlot(Object slot, PresenterWidget content) { // If we're setting a presenter attached to an actual slot, then highlight the tab if (slot == tabContentSlot) { try { - Presenter presenter = (Presenter) content; + Presenter presenter = (Presenter) child; TabContentProxy proxy = (TabContentProxy) presenter.getProxy(); getView().setActiveTab(proxy.getTab()); } catch (Exception e) {