You need to sign in to do that
Don't have an account?

export to excel button using two pages
Hi all,
I have two VF pages that use the same controller. The first page has a button that searchs based on user input and redirects to the second page. The second page should open an excel sheet with the results of the search, but it always comes out blank. The search function works fine without the page redirect so I'm wondering if the redirect is reinitializing the controller. If that's the case how can I pass the results onto the next page?
-Sam
Some code snippet will help us to know more about your problem.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
public PageReference search(){
...
wap = [SELECT stuff FROM place ];
PageReference p = Page.AssetSearchOut;
p.setRedirect(true);
return p; }
in the page AssetSearchOut I am trying to access the query I made in the search function using {!wap}. Remember that both pages have the same controller, so I know that it sees the variable. The question is, does it reload the controller, and therefore clear the list search generated? If it does how can I use the results of this query based on user input in a different visualforce page that I will export to an excel file.
Update this to
setredirect(true) , reinitilize the controller class.