Implement the first actions when selecting an item