Assume that I have 6 Tabs in vf page.All 6 tabs are Different Vf page but used All 6 tabs in single Vf Page. Normally all the Tabs will be View mode. I have button to edit in all Vf pages. For example if I click the any edit button from all six tabs,Remaining all five tabs should be in edit page.

If I click cancel button in any tab all tabs should be back to view mode. iI this possible by using different visualforce pages in one Vf page?. Please Let me know if you need anything on this.

Different Tabs like link

  • Did you tried doing ? Where you are got struck ?
    Sep 18, 2017 at 13:19
  • Thanks for prompt Response,Is it possible to implement.Till now I can switch between multiple tabs in view Mode.how to check previous page was in edit mode, so that next all pages should be edit mode? Sep 18, 2017 at 13:23
  • When you click on edit you have to maintain Some variable to keep track your Mode. either you can use cookies or session for that because it between different vf page. when you click on other tab, Run some script to check value stored in cookies or session is edit or view mode , Then change mode of the page. its all about how you are applying logic.
    Sep 19, 2017 at 4:30

1 Answer 1


I was able to do this using javascript.

var oldURL = document.referrer;

The above part of the line helps to get the previous URL of the page.So oldURL variable will have the previous URL.

 if(oldURL.indexOf( 'Mode=Edit' )> 0 ){

So, here I'm comparing whether in previous page URL have a parameter called "Mode=Edit". So if this is True this will Redirect me to the next page in Edit Mode.

window.location.href = '{!$Page.VF Page Name}?Id={!$CurrentPage.parameters.Id}&Mode=Edit';

Window.location will help to redirect to next page with edit mode.


var oldURL = document.referrer;
if(oldURL.indexOf( 'Mode=Edit' )> 0 ){
   window.location.href = '{!$Page.TXP_PropertyEdit}?Id={!$CurrentPage.parameters.Id}&Mode=Edit';

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .