Good pracices

greenbudh's Avatar


24 Dec, 2013 09:26 PM


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.

  1. Support Staff 1 Posted by Ondina D.F. on 27 Dec, 2013 09:00 AM

    Ondina D.F.'s Avatar


    Sorry for the late response. I'm actually on vacation, so, here, just a quick answer:

    1. 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.

    2. inject models into mediators, as interfaces

    3. use viewProcessorMap

    Discussions on this forum about viewProcessorMap:

    Hope that helps.

  2. Ondina D.F. closed this discussion on 22 Jan, 2014 03:27 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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