Directory

← Back

Vaadin ContextMenu

Unified contextual popup for all Vaadin components.

Author

Contributors

Rating

With Vaadin ContextMenu you can add context menu popup to any Vaadin component. It uses similar API and styling with Vaadin's MenuBar component.

Features:

  • Dynamic, hierarchical context menus
  • Icon support
  • Check/uncheck menu items
  • Keyboard navigation
  • Special item and property support for Grid, Table and TreeTable

Note: Vaadin ContextMenu uses new context click features introduced in Vaadin 7.6.

Sample code


// Create a context menu for 'someComponent'
ContextMenu contextMenu = new ContextMenu(somComponent, true);

// Checkable item
final MenuItem item = contextMenu.addItem("Checkable", e -> {
            Notification.show("checked: " + e.isChecked());
        });
item.setCheckable(true);
item.setChecked(true);

// Disabled item
MenuItem item2 = contextMenu.addItem("Disabled", e -> {
            Notification.show("disabled");
});
item2.setEnabled(false);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Version 3.1.0

  • Fixes issue with warnings due deprecated listener use
  • Vaadin version 8.12.0 or newer required
Released
2021-03-18
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.10+
Vaadin 8.6+ in 3.0.2
Vaadin 8.4+ in 2.1.0
Vaadin 8.0+ in 2.0.0
Vaadin 7.6+ in 0.7.5
Browser
Firefox
Opera
Safari
Google Chrome
iOS Browser
Android Browser
Internet Explorer
Microsoft Edge
Online