Table context menu

Can someone help?
I have a table with some items. And i need a context menu on right button click. I’ve added ActionHandler and it works fine, but then i needed an item to be selected after right click. I’ve added itemClickListener with setValue. And that’s a trouble: i right-click on item, then context menu appears for about half a second, and then item gets selected. But context menu is gone! How could i get such functionality?

can someone help?