Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » [neon] double menus mobile
[neon] double menus mobile [message #1752188] Thu, 19 January 2017 14:50 Go to next message
Andreas Ottiger is currently offline Andreas OttigerFriend
Messages: 5
Registered: April 2010
Junior Member
I have a TablePage "BTablePage" with a "normal" edit menu (only for TableMenuType.SingleSelection). And as a child page there is a BDetailNodePage. As I use the BDetailNodePage in other places too, there is also an edit menu with TreeMenuType.SingleSelection as MenuType.

To prevent to get the edit menu twice when opening the BDetailNodePage below the BTablePage I have overridden computeParentTablePageMenus:

  @Override
  public List<IMenu> computeParentTablePageMenus(IPageWithTable<?> parentTablePage) {
    return CollectionUtility.emptyArrayList();
  }


This works fine on the desktop version. When opening the application on mobile and selecting a row entry the edit menu is still displayed twice. I guess this is because the displayed contents are partly from the TablePage (column values) and NodePage (children).

Where is my mistake? Or what can I do to just get a single menu in mobile as well?

[Updated on: Thu, 19 January 2017 14:51]

Report message to a moderator

Re: [neon] double menus mobile [message #1752190 is a reply to message #1752188] Thu, 19 January 2017 15:30 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 123
Registered: March 2010
Senior Member
I would do the following solution that is even more ergonomic.
for simplicity lets assume a PersonTablePage and a PersonPage (node-page).

1. The PersonTablePage decorates the data using the HTML decorator and AppLinkActions. It does not contain a ModifyMenu.

  protected void execLoadData(SearchFilter filter) {
//...for each loaded data row
    String personHtml = HTML.appLink("person:" + person.getPersonKey(),   person.getPersonName()).toHtml();
    //use the personHtml  app-linnk instead of person.getPersonName()
  }


2. handle the app-link action inside the PersonTablePage.Table class
    @Override
    protected void execAppLinkAction(String ref) {
      MessageBoxes.createOk().withBody(ref + " has been clicked.").show();
    }


3. enable html styling in the PersonNameColumn
    public class PersonNameColumn extends AbstractStringColumn {
//...
      @Override
      protected boolean getConfiguredHtmlEnabled() {
        return true;
      }
    }


4. in the child page PersonPage keep the ModifyMenu.

That way you will have a link in the PersonTablePage for edit and a menu in the PersonPage detail page.

I added some screen shots of my personal mini-crm.
  • Attachment: table.JPG
    (Size: 93.30KB, Downloaded 19 times)
  • Attachment: node.JPG
    (Size: 53.06KB, Downloaded 19 times)
Re: [neon] double menus mobile [message #1752520 is a reply to message #1752188] Tue, 24 January 2017 16:38 Go to previous message
Andreas Ottiger is currently offline Andreas OttigerFriend
Messages: 5
Registered: April 2010
Junior Member
Thanks for the idea (and the help how to do it).

I tried it and found that I prefer the "menu" style ergonomics.

index.php/fa/28203/0/

And on mobile (as mentioned the desktop works already fine for me) the new column (with the link) does not work as expected. In the automatically generated overview with the columns listed as data, the html-content is not rendered as html.

index.php/fa/28204/0/

As I will stick with the menues this doesn't bother me though Wink .

Previous Topic:[neon] Compilation fails with "cannot find symbol" using javac
Next Topic:Status page without login
Goto Forum:
  


Current Time: Fri May 26 05:58:55 GMT 2017

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

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