Setup for Secondary Menu in Taskbar Command #524
Replies: 4 comments 8 replies
-
|
The root cause is probably However, it sounds like you are updating your menu model in that And in here, you don't seem to be configuring the component directly. Your It sounds like, perhaps, you would want a projection to have a lifecycle interface of its own, so that you can update your component model before the projection builds the Swing component in Rewinding all the way back to your very first sentence - For the specific case, this list of previously opened documents - how frequently does it get updated? If it's shown in one of the popup menus, that list can't be (presumably) be getting updates, as the user is interacting with the menu. And if it's not shown, updating it wouldn't be causing any UI refreshes since it is not projected. |
Beta Was this translation helpful? Give feedback.
-
|
It will very much help to:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
The width of the application menu is fixed, and does not depend on the content. See here. You're not seeing the overlap issue because the secondary panel in the application menu has more space than your particular string needs, so when the arrow is displayed all the way at the right edge, there is no content overlap. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Apologies in advance if this is a little long. In our application menu, there is an open menu as follows:

The Recent Documents is itself a sub-menu of previously opened documents, and thus potentially requires updating all the time. I, therefore, added a
SecondaryLifeCycleto the application menu that re-populates the recent documentsonBeforeActivateSecondary. That works quite well.I wanted to also include the open functionality in the taskbar. Initially all I did was:
ribbon.addTaskbarCommand(aOpen.getCommand().project());where aOpen is the open command from the application menu.
That got me 95% there, but I realized the re-populating of the recent documents was not triggering if the user used only the taskbar control and not the application menu. Therefore, I wanted to also add re-populating of the recent documents to the taskbar control. This is what I did:
Functionally this worked. (Although I do wonder if there is a simpler way to use the app command's projection with an added secondary lifecycle). But the Recent Documents menu entry in the taskbar now looks like this:

That is, the arrow indicating the existence of the submenu is over top of the text. Is there a bug or have I done something wrong? (Note that when I was originally just adding the open command's projection to the task bar, as long as I first opened the application menu, the recent documents menu entry had the arrow correctly positioned.)
Beta Was this translation helpful? Give feedback.
All reactions