jsf 2 - Redirecting to same page after showing the sucess message -


this question has answer here:

i want redirect user same page success message, once user saved record in database. using jsf2 primefaces. managed bean in viewscope trying below code in save method.

facesmessage message = new facesmessage(facesmessage.severity_info, "data added successfully","dataadded successfully");         facescontext.getcurrentinstance().addmessage(null, message);       facescontext.getcurrentinstance().getexternalcontext().redirect("mypage.xhtml"); 

i able navigate page no success message displayed. suggestion on this.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -