+ Start a Discussion

Page Refresh issue.



I have a custom object on which I am included a VF page. On that VF page there a command button and on click of that button a method is invoked. In that method i am performing update operation and then redirecting user to custom object again.


Now the issue I am facing with this is: when user clicks the button the first time everything works fine the main page (custom object) refreshes properly but when user clicks the button second time instead of refreshing the entire page it just refreshes the VF page and displays the complete custom object in there.


Can someone please share their thoughts around this.


This is the code written in the method for redirecting:


PageReference result = sController.view(); (where sController is nothing but the standard controller.)





I wrote a blog post a short while ago explaining why this is and sample code for how to get around it.


Its available at: