How to assign action to the item