function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anu Raj.ax1269Anu Raj.ax1269 

How to pass wrapper class value as parameter

Hi,

I have a VF page with controller and in this controller it contain a Wrapper class which is displaying the value apex:pageBlocktable. I have a print button which call a another Vf page where i need to display some values from Wrapper class. I try to use the same controller from both 2 VF pages but it don't work because i call the class and refresh all the values in the class. So i wrote another controller for print VF page but i am not able to pass the values from Wrapper class. Is their any method to do it. Or if their is any other idea, i am open to new idea.

Thanks 

digamber.prasaddigamber.prasad

Hi,

 

You cannot retrieve value of same wrapper class in other controller. The best way I can think of is, pass some query string parameter and based upon that, in the constructor of 2nd controller, build the same data set.

 

Let me know if you have any question about this.

 

Happy to help you!

Avidev9Avidev9
You wrote " I try to use the same controller from both 2 VF pages but it don't work because i call the class and refresh all the values in the class."

Why are you refreshing all the values ? I think you can use the same controller and proceed
bvramkumarbvramkumar

Do you want to pass one instance of the wrapper class or a list of wrapper class instances?

 

Do you want to open the print page in the same window?

 

If the answer for both qusetions is Yes, then you should use Visualforce Wizard methodology

 

http://developer.force.com/cookbook/recipe/creating-a-wizard-with-visualforce-pages

 

If you want to just pass just one instance of wrapper class to Print page and open the Print page in a seperate window, then you can use cookies methodology

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_sites_cookie.htm