+ Start a Discussion

Passing a long list from one StandardSetController to another



I'm wondering if there is a way to do this in a way that doesn't pass the parameters on the query string.


I've got a StandardSetController filled with objects of one type.   I'd like to pass control over to another page, where it's based off of a StandardSetController of a different, but related type.  I've got the list of object IDs of that related type, so I can pass that list over.  I'd rather *not* pass that list through the query string, because then I'm limited by the number of object IDs I can pass on the query string.


Any thoughts? Anyone done anything like this?





Unfortunately I think you'll be out of luck with this.  The only other way to pass the data from the browser would be via a post, but you can't simply execute a post to a VF page, as it requires the post to have come from a visualforce page (and thus have the viewstate encoded in it etc).




That was what I suspected might be the case.


I might instead go about it where for each object type I have a separate set of VisualForce pages, but they all share components and Apex controller extensions, since the controller can properly support the different object types.  (It's properly captured in the view state in that situation.)




Sounds like the way to go.  I seem to recall working on something along these lines many moons ago, and I think we ended up making the controller for the second page the same as that for the first, and using server side redirection (i.e. not setting redirect=true) when moving between pages, so that the data was still in the controller when page 2 was displayed.  Not exactly a silver bullet though.