Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Move the Menu of Desktop into Outline
Move the Menu of Desktop into Outline [message #1809827] Wed, 24 July 2019 06:46 Go to next message
The Maddes is currently offline The MaddesFriend
Messages: 44
Registered: October 2018
Member
Hey guys,

i may have a strange question. Maybe i tried it at the wrong points, but i just cant find a working way.

The basic need why i want(need) to do it is, we have a custom DenseMode Setting in which the menu in the upper right corner will disappear and the user wont be able to logout if he doesnt exit DenseMode before.

So what i want to achieve is to put the UserMenu from the place it is to the outlilne itself. There it may be shown as an icon or text (link?) that doesnt matter at all.

Is there any chance to achieve this?

Excuse my poor drawing, i hope you still get what i want to do.

Thx in advance for your ideas.

index.php/fa/35995/0/
  • Attachment: outline.png
    (Size: 60.90KB, Downloaded 107 times)
Re: Move the Menu of Desktop into Outline [message #1809894 is a reply to message #1809827] Thu, 25 July 2019 11:12 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 179
Registered: March 2010
Senior Member
Hi,

you have several options:
index.php/fa/36006/0/

The simplest one would be to use a header menu. Just put this in your outline:

 
  @Order(2000)
  public class ProfileHeaderMenu extends AbstractFormMenu {
    @Override
    protected String getConfiguredIconId() {
      return Icons.PersonSolid;
    }

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

    @Override
    protected Class getConfiguredForm() {
      return UserForm.class;
    }
  }


You could also create a view button. But unfortunately the view button will change its background-color as soon as it is clicked even though it is not explicitly marked as toggle button. This is probably not what you want. To circumvent it you could override the rule using CSS.

ViewButton in Desktop.java:
  @Order(3)
  public class ProfileViewButton extends AbstractViewButton {
    @Override
    protected String getConfiguredIconId() {
      return Icons.PersonSolid;
    }

    @Override
    protected DisplayStyle getConfiguredDisplayStyle() {
      return DisplayStyle.TAB;
    }

    @Override
    protected void execAction() {
      new UserForm().start();
    }
  }


Another option would be a regular tree node / page. Either open your user form as dialog or use a detail form to embed it.

TreeNode in Outline.java:
    pageList.add(new AbstractPageWithNodes() {
      @Override
      protected String getConfiguredTitle() {
        return "Profile";
      }

      @Override
      protected String getConfiguredIconId() {
        return Icons.PersonSolid;
      }

      @Override
      protected boolean getConfiguredLeaf() {
        return true;
      }

      @Override
      protected void execPageActivated() {
        new UserForm().start();
      }
    });
  }


If you wanted to place it on the bottom left corner, then you would need to write some JS code (basically extend DesktopNavigation.js or Outline.js and put the widget there).

Cheers
Claudio
Re: Move the Menu of Desktop into Outline [message #1810026 is a reply to message #1809894] Mon, 29 July 2019 13:46 Go to previous messageGo to next message
The Maddes is currently offline The MaddesFriend
Messages: 44
Registered: October 2018
Member
Cheers Claudio,

it worked like a charm thank you for the help.
Theres just one little thing which i dont understand, if i set the header visible to false and set it back to true (each with an app link in that menu) the Icon in the upper right corner disappears and wont show up again.

Ill investigate a little more into that, maybe you know why :)
Re: Move the Menu of Desktop into Outline [message #1810068 is a reply to message #1810026] Tue, 30 July 2019 08:58 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 179
Registered: March 2010
Senior Member
Hi Maddes,

this is a known bug which was fixed some months ago. Which version do you use? The commit containing the fix is this one: https://github.com/eclipse/scout.rt/commit/1abb84d6e9790a1c4c6256d2615c019d7e157059 . You can test it with the widgets app, there is a check box called "header visible": https://scout.bsi-software.com/widgets/?dl=widget-desktop

Re: Move the Menu of Desktop into Outline [message #1810070 is a reply to message #1810068] Tue, 30 July 2019 09:21 Go to previous message
The Maddes is currently offline The MaddesFriend
Messages: 44
Registered: October 2018
Member
Ah ok i see that. I didnt update my Version yet.
Im running 9.0.0.009_Simrel_2019_03 at the moment.
Thank you for your help :)
Previous Topic:Null Pointer Exception when working with editable tables
Next Topic:Using PDF.js under JSP (Tomcat)
Goto Forum:
  


Current Time: Mon Oct 21 15:16:18 GMT 2019

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

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

Back to the top