Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 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: 1252
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 338 times)
  • Attachment: multi.png
    (Size: 52.85KB, Downloaded 343 times)
Previous Topic:[neon] Closeable views
Next Topic:Status page without login
Goto Forum:
  


Current Time: Thu Apr 18 09:17:02 GMT 2024

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

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

Back to the top