title: GWTP nested tab presenter
body: <p>I am trying to nest a tab presenter in GWTP. I have one frame (North) that is tab group 1 and one frame (West) that is tab group 2. When I interact with group 1 I update the nested tab presenter which controls group 2. I have looked at the example for nested tab presenters but I have been unable to determine my error from it. </p>
  
  <p>The two TabContainerPresenters are ManagmentTabsPresenter and SettingsTabsPresenter. The children of these are like the HomePresenter below. The content for these children is displayed in the center of a DockLayoutPanel. I want the ManagementTabsPresenter and the SettingsTabsPresenter to be displayed in the West slot of the same DockLayoutPanel. </p>
  
  <p>The problem as I see it is that when this code is run the revealInParent() method of the ManagementTabsPresenter and the revealInParent() method of the SettingsTabsPresenter are both called whenever I try to view one on the child tabs. (i.e. homePresenter). Why are both of these revealInParent methods called? What am I missing? It is true that both SettingsTabsPresenter and ManagementTabsPresenter are in a parent tab that gets revealed. Does this mean that the revealInParent of both of these tabcontainerprestners(nonleavetabcontentproxy) will be called when the parent tabcontainerpreseter is revelatedinparent?</p>
  
  <pre><code>public class HomePresenter extends Presenter&lt;HomePresenter.MyView, HomePresenter.MyProxy&gt; {
  @Inject
  AppPlaceManager appPlaceManager;
  
  @NameToken(NameTokens.homePage)
  @ProxyStandard
  @NoGatekeeper
  public interface MyProxy extends TabContentProxyPlace&lt;HomePresenter&gt; {
  }
  
  public interface MyView extends View {
  }
  
  @TabInfo(container = ManagementTabsPresenter.class)
  static TabData getTabLabel(MainAppGinjector injector) {
      return new TabDataBasic(injector.getVSMMessages().home_tab(), ClientConstants.HOME_TAB_POSITION);
  }
  
  @Inject
  public HomePresenter(final EventBus eventBus, final MyView view, final MyProxy proxy) {
      super(eventBus, view, proxy);
  }
  
  @Override
  protected void revealInParent() {
      RevealContentEvent.fire(this, ManagementTabsPresenter.TYPE_MAIN_CONTENT_SLOT, this);
  }
  }
  
  
  
  
  
  public class ManagementTabsPresenter extends TabContainerPresenter&lt;ManagementTabsPresenter.MyView, ManagementTabsPresenter.MyProxy&gt; {
  
  /**
   * {@link ManagementTabsPresenter}'s proxy.
   */
  @ProxyStandard
  public interface MyProxy extends Proxy&lt;ManagementTabsPresenter&gt; {
  }
  
  /**
   * {@link ManagementTabsPresenter}'s view.
   */
  public interface MyView extends TabView {
  }
  
  /**
   * Fired by child proxie's when their tab content is changed.
   */
  @ChangeTab
  public static final Type&lt;ChangeTabHandler&gt; TYPE_Management_ChangeTab = new Type&lt;ChangeTabHandler&gt;();
  
  /**
   * Use this in leaf presenters, inside their {@link #revealInParent} method.
   */
  @ContentSlot
  public static final GwtEvent.Type&lt;RevealContentHandler&lt;?&gt;&gt; TYPE_MAIN_CONTENT_SLOT = MainPresenter.CENTER_SLOT;
  
  
  /**
   * This will be the event sent to our "unknown" child presenters, in order for
   * them to register their tabs.
   */
  @RequestTabs
  public static final Type&lt;RequestTabsHandler&gt; TYPE_Management_RequestTabs = new Type&lt;RequestTabsHandler&gt;();
  
  @Inject
  public ManagementTabsPresenter(final EventBus eventBus, final MyView view,
                                 final MyProxy proxy,  AppPlaceManager appPlaceManager) {
      super(eventBus, view, proxy,TYPE_MAIN_CONTENT_SLOT, TYPE_Management_RequestTabs, TYPE_Management_ChangeTab);
  }
  
  
  @Override
  protected void revealInParent() {
      RevealContentEvent.fire(this,  MainPresenter.WEST_SLOT, this);
  }
  }
  
  
  
  public class SettingsTabsPresenter extends TabContainerPresenter&lt;SettingsTabsPresenter.MyView, SettingsTabsPresenter.MyProxy&gt; {
  
  /**
   * {@link SettingsTabsPresenter}'s proxy.
   */
  @ProxyStandard
  public interface MyProxy extends Proxy&lt;SettingsTabsPresenter&gt; {
  }
  
  /**
   * {@link SettingsTabsPresenter}'s view.
   */
  public interface MyView extends TabView {
  }
  
  /**
   * Fired by child proxie's when their tab content is changed.
   */
  @ChangeTab
  public static final Type&lt;ChangeTabHandler&gt; TYPE_Settings_ChangeTab = new Type&lt;ChangeTabHandler&gt;();
  
  /**
   * Use this in leaf presenters, inside their {@link #revealInParent} method.
   */
  @ContentSlot
  public static final GwtEvent.Type&lt;RevealContentHandler&lt;?&gt;&gt; TYPE_MAIN_CONTENT_SLOT = MainPresenter.CENTER_SLOT;
  
  
  /**
   * This will be the event sent to our "unknown" child presenters, in order for
   * them to register their tabs.
   */
  @RequestTabs
  public static final Type&lt;RequestTabsHandler&gt; TYPE_Settings_RequestTabs = new Type&lt;RequestTabsHandler&gt;();
  
  @Inject
  public ManagementTabsPresenter(final EventBus eventBus, final MyView view,
                                 final MyProxy proxy,  AppPlaceManager appPlaceManager) {
      super(eventBus, view, proxy,TYPE_MAIN_CONTENT_SLOT, TYPE_Settings_RequestTabs, TYPE_Settings_ChangeTab);
  }
  
  
  @Override
  protected void revealInParent() {
      RevealContentEvent.fire(this,  MainPresenter.WEST_SLOT, this);
  }
  }
  
  
  
  
  public class MainPresenter extends Presenter&lt;MainPresenter.MyView, MainPresenter.MyProxy&gt;{
  
  @Inject VSMRequestFactory requestFactory;
  @Inject VSMMessages vsmMessages;
  @Inject VSMExceptionMessages vsmExceptionMessages;
  @Inject EventBus eventBus;
  
  @ProxyStandard
  @NoGatekeeper
  public interface MyProxy extends Proxy&lt;MainPresenter&gt; {
  }
  
  public interface MyView extends View {
  
  }
  
  @ContentSlot
  public static final Type&lt;RevealContentHandler&lt;?&gt;&gt; SOUTH_SLOT = new Type&lt;RevealContentHandler&lt;?&gt;&gt;();
  @ContentSlot
  public static final Type&lt;RevealContentHandler&lt;?&gt;&gt; WEST_SLOT = new Type&lt;RevealContentHandler&lt;?&gt;&gt;();
  @ContentSlot
  public static final Type&lt;RevealContentHandler&lt;?&gt;&gt; CENTER_SLOT = new Type&lt;RevealContentHandler&lt;?&gt;&gt;();
  @ContentSlot
  public static final Type&lt;RevealContentHandler&lt;?&gt;&gt; NORTH_SLOT = new Type&lt;RevealContentHandler&lt;?&gt;&gt;();
  
  @Inject
  public MainPresenter(EventBus eventBus, MyView view, MyProxy proxy) {
      super(eventBus, view, proxy);
  }
  
  @Override
  protected void revealInParent() {
      RevealRootLayoutContentEvent.fire(this, this);
  }
  
  @Override
  protected void onReveal() {
      super.onReveal();
      initializeAppUser();
  }
  
  }
  </code></pre>