Refactor entity controller - renderViewPage()