You need to sign in to do that
Don't have an account?
Unable to Save the field values in VF
I create two vf pages(2 step wizard). the page 1 have next and cancel button and page 2 have previous, save and cancel button.
Requirement: allow users to enter the values in the fields and save it. User should also be able to view the values of the field entered in page1 and page2
Problem: The users can enter the data in both the pages but after saving the record and when the user view them. only the field values from page1 is visible and all the field values form page2 is empty. My controller code only inclues navigation from one page to another. Save, previous, next and cancel are the standard button (code in the VF page)
Need help is knowing why field values from page1 is saved and page2 is empty.
public class qualityCheckController { public qualityCheckController(ApexPages.StandardController controller) { } public PageReference step1() { return Page.QualityCount1; } public PageReference step2() { return Page.QualityCount2; } }
As per your code, i can conclude that in step1 you are returning different page than step2 and this is the problem. The variable value is not persisted. If you want to create the Wizard like behavior then same controller should be used for same page otherwise the value will not be persisited.
Let me know in case you need more clarification.
Can you plese tell me how my controller code should look like ?
Hi,
Please have a look at below code. This is not working code but the example that hoe to create a wizard: