Reputation: 91
I am trying to make the Vaadin plugin GridContextMenu work on my project. I am using version 8.7.1 of Vaadin, recently migrated from an earlier version 7. I first used version 2 of the context menu but did not get any visible results. So I tried to take the latest version. I now get the following error:
java.lang.NoSuchMethodError: com.vaadin.ui.MenuBar.addItem (Ljava / lang / String;) Lcom / vaadin / ui / MenuBar $ MenuItem;
I tried to clean the caches of Maven and my IntelliJ, my local .m2 and recompile my widgetset etc... But I always get the same error.
Here is the line of code causing the problem :
GridContextMenu<VehiculeImmat> gridContextMenu=new GridContextMenu<>(this);
Has anyone ever gotten that problem or an idea of how to solve it?
Upvotes: 0
Views: 297
Reputation: 44
Hy, This is causing due to API version mismatch as GridContextMenu is moved to package com.vaadin.v7.contextmenu so try to change import package. ContextMenu v3.0 is rewritten so they have changed some package hierarchy but it compatible with Vaadin7 and 8.
Further see API doc and release notes on following link https://vaadin.com/directory/component/vaadin-contextmenu/api
Upvotes: 1