Menubar root item doesnot open

The menubar root item doesnot open its content until there is another action invoked on the same page. Example - If I open a combobox present near the menubar and then click on the root item, the root item shows the content else it doesnot respond to click function.

Thanks in advance.

Try calling menubar.setImmediate(true).

setImmediate doesnot work.

I tested this on 7.2.2 and it seems to work fine. What version are you using? are you using a custom widgetset? any listeners or commands in the menu? And lastly, are there any javascript exeptions when this happens?

Sorry about all the questions, but they will help narrow things down.

Has this got anything to do with it

Jun 25, 2014 2:15:05 PM com.vaadin.server.communication.ServerRpcHandler parseInvocation
WARNING: RPC call to v.v received for connector 4970 but no such connector could be found. Resynchronizing client.

Could be. I could help you better if you answered the questions above, though.

  • Vaadin version - 7.1.10
  • Using custom widgetset - basically only for addons
  • No commands/listeners
  • No javascript exceptions
  • Actually after complete UI is shown, the click event on menubar root doesnot work.
  • Then after clicking on other components, the above warning message is shown(WARNING: RPC call to v.v received for connector 4970 but no such connector could be found. Resynchronizing client.)
  • Then the menu root opens on click

OK, a couple of things to try:

Add ?debug to your URL and check the info tab. Make sure that the client and server version of Vaadin match. If not, recompile the widgetset.

Add -ea to the server JVM parameters to enable assertions. These check for things like adding components to layouts in the wrong places etc.

  1. ?debug shows error -
    Could not determine ApplicationConnection for Overlay. Overlay will be attached directly to the root panel

  2. -ea - Unable to run, error - ‘session must be locked on getState()’ in a spawned thread for parallel task.

The second issue comes from the fact that you are accessing a Vaadin UI from an outside thread (not the request thread). All such calls need to go through UI.access(); you need to wrap the accessing code inside a Runnable.

The first issue isn’t an issue in most cases; I’m not sure it has anything to do with your case. Fix the one above first and look for other issues after that.

I had this issue once, with the same first error as you (Could not determine…) when I had a MenuBar in a CssLayout. When I changed the CssLayout to a HorizontalLayout, the items in the menu did show up.

Error - “Unknown Embedded; no type or mimetype attribute”