Context Menu for Table

Hi!

Is there a way to have a context menu (right click menu) in a table show up for only certain items? Like remove it for certain rows?

Thanks!

Hi

If you are using the action handler, you could mess with the getActions() method, and only have it return the context menu for specific target (i.e. ID of the item)

    @Override
    public Action[] getActions(Object target, Object sender) {

     if(target == target1){
        return actions;} 
     else if (target == target2){
        return actions2; \\empty array returns no menu
       }

    }