View Full Version : Context Menu declared in uibinder is shown on reveal

25 Jan 2012, 7:07 AM
Using ext gwt beta 3.0.0 - beta2 with gwtp 0.6
when a context menu is declared as follows:


<container:FlowLayoutContainer addStyleNames="row">
<menu:Menu ui:field="_contextMenu" shadow="true" visible="false" />

It is shown when the widget is first shown, before the mouse is clicked. setting the visible attribute to false doesn't change things.

25 Jan 2012, 7:30 AM
You are not setting any contextmenu. You are setting the menu as normal child to your FlowLayoutContainer. You need to add it to the contextMenu attribute of the FlowLayoutContainer. To make this work you will need to provide it or use the GXT UiBinder bridge and add it using ui attributes.

26 Jan 2012, 1:19 AM
Thank you for your quick answer. And how to declare a context menu in the xml then?

26 Jan 2012, 7:34 AM
You probably need to declare it separately in a distinct .ui.xml and attach it to the view when needed.