You need to sign in to do that
Don't have an account?
Sunay - KVP Bus Solns
Back Button functionality of a browser in a visual force page
Hi,
We have a application built of Visual force pages and in every page we have a back button. Here I am trying to achieve the functionality of a "Back button in Browser " using only APEX Code.
Can anybody suggest some ideas as to how I can add a method to achieve this or is there any different approach which will help me.
The one way of using Back button is calling a apex method on commandButton.
<apex:commandButton value="Back" action="{!backMethod}"/>
In apex code,
public pagereference backMethod()
{
Pagereference pg = new Pagereference('/apex/NameOfPage); // Include name of page where user should be navigated after clicking on Back button
pg.setRedirect(true);
return pg;
}
Hope this helps :)
Thanks,
Devendra