system.debug('wrapper class detail   :' + LstSelectedAlaCarteItem); 
sendother = new PageReference('/apex/EAPQuickStartCreditReport?fname='+fname+'&lname='+lname+'&startdate='+startdate+'&eml='+eml+'&ponumber='+ponumber+'&SelectedAccount='+selectedAccount+'&packagecode='+packagecode);
return sendother;

LstSelectedAlaCarteItem is a Wrapper. After line 4 this list become empty .

My question is how to pass the wrapper list in PageReference method where i use the list in my controller .

1 Answer 1


If both the pages use the same controller then you can navigate from one to the other by making sure you set the setRedirect parameter to false when returning the page reference for the second page

public PageReference gotoPage2(){
  PageReference pageRef = new PageReference('/apex/Page2');
  return pageRef;  

You dont have to pass any page parameters since its the same controller all the controller variables will be accessible once you navigate to the second page.

Put the list 'LstSelectedAlaCarteItem' in a controller variable just so that you can access it in the next page.

public *var type* LstSelectedAlaCarteItem {get; set;}
  • Thanks for Reply Now Its going Good. But I want to know How its working? Jun 28, 2017 at 4:54
  • @vikasrathi, when you setRedirect as false, it does a client side re-direct and server side controller maintains its view-state. Controller variables get passed from one page to another.
    – RedDevil
    Jun 28, 2017 at 5:01

You must log in to answer this question.

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