cancel
Showing results for 
Search instead for 
Did you mean: 

Single function to redirect to certain view

nico23
Senior II

I'm having a Model that receives data from the backend. I need that, according to the data received, independently of what view you're in, the presenter of the view executes a function that goes to a specific view.

 

For instance, I'm receiving 1 in the Model, weathever the view I'm in, there will be a function in the Presenter that recieves the 1 and knows that it has to change view to the appropriate one.

 

My function that maps the input to the view I've to change to is always the same, so I'm trying to avoid copying the whole logic in every presenter and just implement a single function that calls the bigger function that manages the logic.

 

The idea is to create a singleton class in the common folder and use it. I was just wondering if this behavior could be achieved in some way with FrontendApplication.cpp

0 REPLIES 0