cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to launch a view from model whatever is the current view

Professional
Senior

Hello, i had no response to that question

How to go to a view from Model without using modelListenner

to go to a view i call a virtual function from modelListenner DISPLAY_MYVIEW that do a call to presenters, and then to views (that then do application().gotoMyView(); )

I want to display the MyView screen with a call from the model (on an external event; whatever is the screen currently shown)

For that i don't want to call a virtual function from modelListenner: it would mean that have to define in each view and presenter the function DISPLAY_MYVIEW.

Is it possible ?

thanks for any support

best regards

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Hi @Professional​,

Sorry, i've been traveling and haven't had the time to catch up fully yet.

Sending messages to presenters and changing screens (showing a different view) are two different things. You can display any view you want by calling the generated goto methods (by designer) on the Application class.

e.g. from model:

static_cast<FrontendApplication*>(Application::getInstance())->gotoMyScreen();

View solution in original post

3 REPLIES 3
Martin KJELDSEN
Chief III

Hi @Professional​,

Sorry, i've been traveling and haven't had the time to catch up fully yet.

Sending messages to presenters and changing screens (showing a different view) are two different things. You can display any view you want by calling the generated goto methods (by designer) on the Application class.

e.g. from model:

static_cast<FrontendApplication*>(Application::getInstance())->gotoMyScreen();

Thanks a lot for the support

You're very welcome!