Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Container Menu with Children & Single/MultiSelection
Container Menu with Children & Single/MultiSelection [message #1755097] Tue, 28 February 2017 06:51
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1237
Registered: October 2011
Senior Member
I have the feeling that child menus of a container Menu do not behave as expected.
With this code added to the PersonTablePage (contacts demo app)

@Order(2000)
public class ContainerMenu extends AbstractMenu {
  @Override
  protected String getConfiguredText() {
    return "Container";
  }

  @Order(1000)
  public class SingleMenu extends AbstractMenu {
    @Override
    protected String getConfiguredText() {
      return "Single child";
    }

    @Override
    protected Set<? extends IMenuType> getConfiguredMenuTypes() {
      return CollectionUtility.hashSet(TableMenuType.SingleSelection);
    }

    @Override
    protected void execAction() {
      MessageBoxes.createOk().withBody("SingleSelection").show();
    }
  }

  @Order(2000)
  public class MultiMenu extends AbstractMenu {
    @Override
    protected String getConfiguredText() {
      return "Multi child";
    }

    @Override
    protected Set<? extends IMenuType> getConfiguredMenuTypes() {
      return CollectionUtility.hashSet(TableMenuType.MultiSelection);
    }

    @Override
    protected void execAction() {
      MessageBoxes.createOk().withBody("MultiSelection").show();
    }
  }
}

@Order(3000)
public class SingleMenu extends AbstractMenu {
  @Override
  protected String getConfiguredText() {
    return "Single root";
  }

  @Override
  protected Set<? extends IMenuType> getConfiguredMenuTypes() {
    return CollectionUtility.hashSet(TableMenuType.SingleSelection);
  }

  @Override
  protected void execAction() {
    MessageBoxes.createOk().withBody("SingleSelection").show();
  }
}

@Order(4000)
public class MultiMenu extends AbstractMenu {
  @Override
  protected String getConfiguredText() {
    return "Multi root";
  }

  @Override
  protected Set<? extends IMenuType> getConfiguredMenuTypes() {
    return CollectionUtility.hashSet(TableMenuType.MultiSelection);
  }

  @Override
  protected void execAction() {
    MessageBoxes.createOk().withBody("MultiSelection").show();
  }
}


I get this:

SingleSelection:
index.php/fa/28596/0/

MultiSelection:
index.php/fa/28597/0/

The "Single root" and "Muti root" menu appears as expected. But this is not the case for the children Menu "Single child" and "Multi child " of the "Container" Menu.

What I am missing?


  • Attachment: single.png
    (Size: 54.31KB, Downloaded 72 times)
  • Attachment: multi.png
    (Size: 52.85KB, Downloaded 79 times)
Previous Topic:[neon] Supplying a desktop when unit testing forms
Next Topic:[neon] Problems with server unit test -> @BeforeClass called too late
Goto Forum:
  


Current Time: Wed May 24 13:33:34 GMT 2017

Powered by FUDForum. Page generated in 0.04778 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software