WillyCornbread
|
|
« on: April 16, 2010, 04:17:10 » |
|
Hi -
I have a beginner view question as I dive through PureMVC....
I'm working in a Flash environment and as such my mediators actually create their viewcomponents themselves in their constructor. However, in an effort to keep my view components from knowing anything about PureMVC I find myself always creating empty viewcomponent constructors - then adding a 'renderContent' type method that I call from the onRegister of the mediator and have to pass in a great deal of info to my view component (stylesheets, messaging strings, configuration details etc). I have a nagging feeling there is a better way??
To recap:
+ View mediator is created and registered in a command. + View mediator creates it's view component in the constructor. + In the onRegister of the mediator, I retrieve several proxies (site configuration, stylesheet, etc) and then pass some values from these proxies in to a 'renderContent' method that then draw the contents of the view. + View component is added to stage via notification to an application mediator.
Is there a better or more accepted way to draw the components yet keep them from touching the framework themselves?
Thanks in advance!
b
|