+ Start a Discussion
rajjjjrajjjj 

Passing variable value between 2 controllers.

Hi All,

 

I have a VF page which has 2 components. Lets take first component which has a controller, lets call controller1. I was having a standardsetcontroller variable in controller1. After filtering and retrieving records I am trying to pass that value to another VF page which has a controller, lets call controller2.

To make it clear----->
Component1 has Controller1.
Vf page has Controller1 and Controller2.(which is used for downloading excel)

In controller2 I need list of object values from controller1.

For that I have declared a static variable in controller1 and passing it to controller2, But its returning null value.

Where am I missing!!!!!!

rajjjjrajjjj

I dont think that is the thing I am looking for. Its a bit different.

I need to save into an excel file after retrieving records from standardset controller. I am using same controller for both Component(where orders are retrieved) and VF page(which is used to generate excel.)

I am assuming since it is using same controller when 2nd vf page is called...it might be creating a new instance and all previous values are lost which are the orders retrieved..