+ Start a Discussion
chanti kchanti k 

how to move the data from one page to another page ? please see the below my requirement

HI All,

I have 3 visualforce pages. like V1, V2 and V3 Pages . Now my requirement is V1 page and V2 pages move to V3 Page (Entire the data from V1 , V2 to V3 Page.) how to we can achive this .pls give me with example code . 

Kindly help on this. 
Amit Chaudhary 8Amit Chaudhary 8
Try to make single Controller Class (Apex ) for all three VF pages.
chanti kchanti k
Hi Amit,

Thanks gave to reply. i know that one  but here  i am little bit confuse.., how to implement single controller for all the page, please guide me with example code .

i hope on you .you are help me.

Thanks,
Chanti
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for sample code
1) http://www.forcetree.com/2009/06/passing-parameters-to-visualforce-page.html
2) http://salesforce.stackexchange.com/questions/66856/how-to-carry-values-from-one-page-to-another/66868
3) http://srinusfdc.blogspot.com/2012/07/passing-parameters-to-visualforce-page.html
4) http://blog.jeffdouglas.com/2008/11/14/redirecting-users-to-different-visualforce-pages/


 *VF page1:
<apex:page controller="customcontroller1">
<apex:form >
   Name<apex:inputtext id="inpEmployeeName" value="{!EmployeeName}"/><br/>
   <apex:CommandButton value="Next" action="{!next}" id="cmdNext" />
</apex:form>
</apex:page>

*VF page2:
<apex:page controller="customcontroller1">
   .The employee name is {!EmployeeName}
</apex:page>

*APEX Controller1:
public class customcontroller1 {

    public PageReference next() {
        PageReference nextpage = new PageReference('/apex/Page2');
        nextpage.setRedirect(False);//By default it is false, we should not make it true
        //if we make it true values will be vanished while we are navigating from one 
        //page to another page
        return nextpage;       
    }
    public String EmployeeName { get; set; }
}

Let us know if this will help you
 
chanti kchanti k
Amit : Thank you so very much..it is working..:)