Wizard with presentation-model pattern

Jan 2, 2009 at 11:27 PM
One of the modules in my application is presenting a wizard-like GUI. I've approach this by using a compositeView (WizardCompositeView) that contains the "constant" parts of the wizard (back, next, step account etc). The composite view have a control that is bound to the currentStepView property of WizardCompositViewPresentationModel. All the various wizards views eventually add up to update a single object (FileTypeDefinition).
My thinking was that the WizardCompositViewPresentationModel will keep the state of this single object (FileTypeDefinition). So that with each step the current view will update the single object in the WizardCompositViewPresentationModel (using an event). To sum up: each time the user click next the following would happen:
  1. Step1ViewPresentationModel publish an event with the updated FileTypeDefinition as a parameter.
  2. WizardCompositViewPresentationModel is subscribed to the event. It picks up the FileTypeDefinition and update its own copy of the object.
  3. WizardCompositViewPresentationModel update currentStepView property to be IStep2View. As a consequence WizardCompositeView displays Step2View (instead of) Step1View.
  4. Step1ViewPresentationModel need to get a copy of FileTypeDefinition and this is where I'm stuck...
What I can't figure out is how to access FileTypeDefinition object from WizardCompositViewPresentationModel each time the next step view is loading.
Any idea will be great and if I'm approaching that all wrong I'll be happy to hear it as well,
Thank you,