Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think I've got this figured out.</p> <p>In your presenter with the TabLayoutPanel (let's call it MainPresenter):</p> <pre><code>@ContentSlot public static final Type&lt;RevealContentHandler&lt;?&gt;&gt; SLOT_first = new Type&lt;RevealContentHandler&lt;?&gt;&gt;(); @ContentSlot public static final Type&lt;RevealContentHandler&lt;?&gt;&gt; SLOT_second = new Type&lt;RevealContentHandler&lt;?&gt;&gt;(); public interface MyView extends View { public void setMainPresenter(MainPresenter presenter); public TabLayoutPanel getTeamsPanel(); } @Inject PlaceManager placeMananger; @Inject FirstPresenter firstPresenter; @Inject SecondPresenter secondPresenter; @ProxyCodeSplit public interface MyProxy extends Proxy&lt;MainPresenter&gt; { } @Inject public MainPresenter(final EventBus eventBus, final MyView view, final MyProxy proxy) { super(eventBus, view, proxy); view.setMainPresenter(this); } @Override protected void revealInParent() { RevealRootContentEvent.fire(this, this); } public void setTabContents(Integer tab) { if (tab == 0) { placeMananger.revealPlace(new PlaceRequest("first")); } else if (tab == 1) { placeMananger.revealPlace(new PlaceRequest("second")); } </code></pre> <p>Then in your MainView implement the method setMainPresenter() to store a reference locally. Implement the usual setInSlot() and then add this tab handler:</p> <pre><code>@UiHandler("mainTabs") void onMainTabsBeforeSelection(BeforeSelectionEvent&lt;Integer&gt; event) { mainPresenter.setTabContents(event.getItem()); } </code></pre> <p>The handler will call MainPresenter each time the user changes tabs. setTabContents() will then call revealInParent() for the appropriate "tab" Presenter.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload