Table context menu and multi selection

Hi,

Today we can only retrieve one element from the context menu handler : the value of the row which was right-clicked (passed as the target parameter). Is there any chance that we get a collection of values of the selected rows instead ?

This could be great for deleting mutiple rows, or displaying different actions depending the selection is multiple or not.

I created a new enhancement :
#5945

Bye

How about making the Table immediate, and inside your right-click action handler, you’d just get the value from the table directly?

Hi Henrik !

Indeed that does the trick…my question was badly oriented. Actually I was wanting to display a different context menu depending on the table selection (i.e. display an “Edit” entry only when one element is selected). Problem is, getActions(Object target, Object sender) method is called only once, when the page is loaded (more precisely when the Table is painted).

I managed to do what I wanted by setting a valueChangeListener on my Table which calls requestRepaint()