replace $this->isAjax_ with request method
s/this->messageService/get(session.flash_bag)/