Skip to content

Instantly share code, notes, and snippets.

View pchittum's full-sized avatar

Peter Chittum pchittum

  • Freelance
  • UK
  • 19:05 (UTC -12:00)
View GitHub Profile
@pchittum
pchittum / ViewStateStudy_controller
Created December 12, 2013 15:39
How Visualforce passes data between two pages. These are examples supporting a post on salesforce.stackexchange.com regarding how to "save" data when redirecting to another page. My argument was that one solution is to take advantage of view state in Visualforce to pass the data around. http://salesforce.stackexchange.com/questions/21899/starts-…
public with sharing class ViewStateStudy_controller {
public String accId{get;set;}
public Account account{get;set;}
public ViewStateStudy_controller()
{
accId = ApexPages.currentPage().getParameters().get('Id');
if(accId != null)
{