how to switch from one view to another without destroying the old one in non mobile app
-
21-12-2019 - |
Question
I am wondering how can i go for example from shell to form page and then go back to shell to its current status when i am done with the form. for example i have things inspector open in shell and i want to go back to the same thing inspector when i leave form page. without using mobile library. at the moment i do the following but i am wondering if there is a better way?
var mainShellView = sap.ui.getCore().byId("Shell1");
var formView = sap.ui.jsview("formView", "form");
oTI.exit();
mainShellView.destroy();
formView.placeAt("content");
}
Solution
Why not use the Shell itself to navigate between views / forms? That's the main purpose of the Shell control anyway ;-)
Just set
mainShellView.setContent(<your_view_reference>);
accordingly to switch between different views inside your shell
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow