You need to sign in to do that
Don't have an account?
Ola Bamidele
Two Page Reference in the same Apex Code
Hi Gurus,
I have a visualforce page with 2 flags on them that are links to the same page but in a different language.
As you can see in my apex code, the first page reference is goes to the UK version and the second page reference goes to the France version.
However then the UK link is clicked on the Visualforce page, it automiatically goes to the France whereas it suppose to go to the UK version. I've been researching and im understanding is that this is happening because the France version is the last page reference so it goes to that page.
Please does anyone know how I can ensure that when the english link is clicked, the page reference for the english version is selected and the same for the France one?
If you do, please let me know, thanks!!
My Apex Code:
I have a visualforce page with 2 flags on them that are links to the same page but in a different language.
As you can see in my apex code, the first page reference is goes to the UK version and the second page reference goes to the France version.
However then the UK link is clicked on the Visualforce page, it automiatically goes to the France whereas it suppose to go to the UK version. I've been researching and im understanding is that this is happening because the France version is the last page reference so it goes to that page.
Please does anyone know how I can ensure that when the english link is clicked, the page reference for the english version is selected and the same for the France one?
If you do, please let me know, thanks!!
My Apex Code:
public with sharing class CustomerSatisfactionFR2{ public String currentRecordId {get;set;} public CustomerSatisfactionFR2(ApexPages.StandardController controller){ this.currentRecordId = ApexPages.CurrentPage().getparameters().get('id'); } public PageReference UK_Flag () { PageReference pageref = new PageReference('/apex/CustomerSatisfaction_EN?Id='+currentRecordId); pageref.setRedirect(true); return pageref; } public PageReference France_Flag () { PageReference pageref = new PageReference('/apex/CustomerSatisfaction_FR_2?Id='+currentRecordId); pageref.setRedirect(true); return pageref; } }
You should post the code of the Visualforce page (the problem is probably into it).