Guys, we are facing the following issue for transfering the data between mediators through notifications.
Our app mainly consists of a viewstack which has 20 different views. Views are switched by the events dispatched by the Menu item. We are registering the mediators on the CREATION_COMPLETE event of each child. We got some scenarios, where we need to navigate from one view to another view(target view) by passing some information. We are doing this by sending a notification from the existing view and handling it in the application mediator(where it has access to the viewstack). There in the handler I am temporarily storing the data sent, dispatching an event to set the viewstack index to the target view and listening for the SHOW event of the target view(because by this time the view has not been created, so façade doesn’t know the interests of the target view). In the handler for this SHOW event I am dispatching notification attaching the temporarily stored data and handling this notification in the target view mediator.
Currently we need to circle all the way in order to send data from one viewstack view to another. Can you suggest any better suggestion for doing this?
any help will be appreciated.