|Re: Submenu does not show up [message #636797 is a reply to message #636747]
||Tue, 02 November 2010 19:40
| Alex Molochnikov
Registered: July 2009
Sorry, but you lost me on this one.|
I have a menu contribution where I list a number of items (commands).
The contribution's locationURI is
popup:#BaseMapViewPopup?after=additions. There is a
registerContextMenu() call for this ID in the code.
In the toolbar contribution (which is fairly symmetrical to the popup
menu) I have a command that serves as an anchor point for the pull-down
menu. The command has a unique ID, that is also referenced in another
menu contribution, which lists the submenu items. This part works as
Now, the context menu needs an anchor point too, otherwise how does the
framework know where to put the submenu in?
Anyway, I did the following:
1. added registerContextMenu() for "#BaseMapViewPopup.displayType" in
2. added the new menu contribution to plugin.xml with locationURI
3. populated this contribution with a menu item (ID
4. populated this menu item with commands.
... (more similar commands here)
No submenu shown anywhere. Which makes sense, because there is nothing
to tell the framework how to stick this in the main context menu.
Paul Webster wrote:
> Alex Molochnikov wrote:
>> In my code I added:
>> site.registerContextMenu("#BaseMapViewPopup.displayType", menuManager,
> The ID you pass into registerContextMenu(*) has to match the locationURI
> of your menuContribution: ex, for that registerContextMenu(*) you would
> be using popup:#BaseMapViewPopup.displayType?after=additions
> Then make sure your <menu/> element in that menu contribution has its
> own unique ID (and not #BaseMapViewPopup.displayType again).
Powered by FUDForum
. Page generated in 0.02570 seconds