Good pracices
Hello,
If a view is added to stage a mediator is created.
Now, how do you populate the view with data, if you dont inject
model inside the view.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on 27 Dec, 2013 09:00 AM
Hello,
Sorry for the late response. I'm actually on vacation, so, here, just a quick answer:
classical way
Mediators listen for events dispatched by a Model when its data changes.
Mediators can access their Views through their APIs when they receive the event, passing a payload with a VO containing the data needed by the view.
inject models into mediators, as interfaces
use viewProcessorMap
https://github.com/robotlegs/robotlegs-framework/blob/master/src/ro...
Discussions on this forum about viewProcessorMap:
http://knowledge.robotlegs.org/search?q=viewprocessormap&recent...
Hope that helps.
Ondina
Ondina D.F. closed this discussion on 22 Jan, 2014 03:27 PM.