Title: Mediators Send, Declare Interest In and Receive Notifications Post by: Helmut Granda on June 25, 2009, 02:08:21 From the documentation:
When they are registered with the View, Mediators are interrogated Here is my question. I have views within my views like this: top level view - ---mediator -------low level view now the "low level view" is instatiated by the mediator and it is basically a button. I am able to send a notification from the "low level view" that the mediator recognizes and is able to process correctly but I am 100% percent certain this is not the way to go. Having access to the facade from any place makes it easier to send notifications from any where but is that beneficial? Title: Re: Mediators Send, Declare Interest In and Receive Notifications Post by: puremvc on June 25, 2009, 06:26:36 Don't send notifications from within your view components, it makes them less portable. The view component should not be aware of the PureMVC apparatus and should communicate with the system by exposing an API of events, methods and properties that the mediator can listen for, call and set respectively.
-=Cliff> Title: Re: Mediators Send, Declare Interest In and Receive Notifications Post by: Helmut Granda on June 26, 2009, 09:27:26 It does makes total sense and it is the core of this kind of development.
It is so tempting to do the wrong thing with so much power. |