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:
What I can't figure out is how to access FileTypeDefinition object from WizardCompositViewPresentationModel each time the next step view is loading.
- Step1ViewPresentationModel publish an event with the updated FileTypeDefinition as a parameter.
- WizardCompositViewPresentationModel is subscribed to the event. It picks up the FileTypeDefinition and update its own copy of the object.
- WizardCompositViewPresentationModel update currentStepView property to be IStep2View. As a consequence WizardCompositeView displays Step2View (instead of) Step1View.
- Step1ViewPresentationModel need to get a copy of FileTypeDefinition and this is where I'm stuck...
Any idea will be great and if I'm approaching that all wrong I'll be happy to hear it as well,