Table - image on context menu


Is there a way in vaadin to put images in the context menu for table.

I searched everywhere but could not find the answer.

Thanks in advances.

The context menu
s can have an icon.

If you need more flexibility, you could also make a custom context menu, perhaps by having a click listener for the table (or an item) that handles right-clicks. It could open a
component (from an add-on), for example.

Thnx man, i didnt know you could set an icon to an action…


Table t = new Table();
final ContextMenu menu = new ContextMenu();
menu.addItem(“Click me!”);

	table.addListener(new ItemClickEvent.ItemClickListener() {
		private static final long serialVersionUID = 1L;

		public void itemClick(ItemClickEvent event) {
			if(event.getButton() == ItemClickEvent.BUTTON_RIGHT), event.getClientY());


Does not work, see reply from Peter Lehto.

table.refreshRowCache(); on table ValueChangeListener triggers unnecessary re-querying of data.
If you could present a workaround for updating the available table item actions, that would be great.

: managed to get it to work, see: