In my code (visualforce wizard with many pages referencing one controller) i use public PageReference step2(){ return Page.Step2; } and it works fine. In your example you are using redirect=true and i think it flushes a whole view state.
–
mast0rFeb 20 '13 at 14:13

1 Answer
1

As @mast0r referenced in a comment on the first post, this is related to the fact that the redirect is set to true. Take a look at the PageReference class documentation:

setRedirect

Sets the value of the PageReference object's redirect attribute. If
set to true, a redirect is performed through a client side redirect.
This type of redirect performs an HTTP GET request, and flushes the
view state, which uses POST. If set to false, the redirect is a
server-side forward that preserves the view state if and only if the
target page uses the same controller and contains the proper subset of
extensions used by the source page.

Note that if the URL of the PageReference object is set to a website
outside of the salesforce.com domain, or to a page with a different
controller or controller extension, the redirect always occurs,
regardless of whether the redirect attribute is set to true or false.

Yeah I can see that now, thanks for pointing it out... I'm urnning into a problem where when I return Page.SearchResults, the search buttonclick event is not causing a page redirect to the Search Results Page... any insight on this?
–
gfppasteFeb 20 '13 at 15:51