+ Start a Discussion
krishna p 28krishna p 28 

maintain view state/ stateful apex controller

I have a requirement to maintain the view state of a page and carry the parameter to third page and insert this parameter along with other parameters of third page into account. I am using same controller for all three pages. Is there any way to make apex controller stateful or carry the parameters to 3rd page.

In second page I am capturing the parameters of child of account. I want these parameters also carrie dto third page. After inserting the account in 3rd page, I want to query the id of account and then insert the child object parameters captured in 2nd page and tie them to this account.

Is this approach correct?
Any thoughts or workarounds are highly appreciated.

Thanks in Advance.

Shashi PatowaryShashi Patowary
Hi Krishna,

What I have understood that you are basically trying to create a searies of pages for data entry - also called as Wizard.The simple way to achieve it - you can create your vf pages as per required data entry and maintain the state of pages using a common controller class.

You can find a good example in VF page guide. Please refer to the below link -


Please let me know if it helps.