setting trigger events for the view