I have a multi-step user interaction to create a "parent" object that has a few more associated with it. I need to be able to let the user go back and forth between the pages so they can make corrections and such.
At first, I just started creating the objects (and saving to the db) from the first page on, but this seemed problematic in that I didnt want to have to cleanup the objects (and the db) if the user cancelled the process before completion.
So, I thought I'd store intermediate values in the session and then create and associate the various objects only at the end.
I'm not sure this approach is the best because it may be a use of session that isn't really right and I lose the step by step validation (though I think there are other means of validating other than what gets performed by the callbacks... right?).
One thing I run into is that this approach needs to associate the form fields with something and if I just ref the session variables, it doesnt seem to work. Also, in the case that the user goes backwards in the wizard, I need to fill the form fields with the previously entered values.
Is there something obvious I'm missing here? Have I made this too complicated?