I have two visual force pages that use the same controller. There a few fields which I set on the first visual page which I would like to access on the second visualforce page. I was wondering how I could accomplish this?
Here is what I currently have in my controller:
// most functions have been removed.
public with sharing class someController{
//standard controller declarations
private ApexPages.StandardController controller {get;set;}
public String identifier {get;set;} //This is the field I want to access on both pages
/**
* Constructor
**/
public DeviceLookupController(ApexPages.StandardController controller) {
this.controller = controller;
}
}
Essentially, I want the identifier
field to be available on two visualforce pages from the someController
.
The someController
that is shown above is an extension to both pages, and the standardController
is set as the same object on both pages.
Something similar is implemented in the documentation.
You man want to have a look at it.