on 2015 Aug 17 4:18 AM
Hi all,
Suppose we have two pages, page 1 and page 2, which are corresponding to view 1 and view 2.
Now I have a requirement of navigation from page 1 to page 2, for example, by clicking a button on page 1.
I am wondering if I need App tag in both page 1 and page 2.
Actually, I have gone through the demo and take it as reference, but I didn't get it worked.
I noticed that the demo uses nested views. Only in the root view, App tag is used. Does that matter?
Hi Ming,
Navigation in UI5 can be done via Event bus of App or using a Router Mechanism.
If you created application, by keeping sap.m.App at the top level, you can use event bus mechanism directly.
Assume, oApp = new sap.m.App();
oApp.addPage(page1);
oApp.addPAge(page2);
then on click from page1, you can navigate to page 2, just by oApp.to(page2, context);
For broader explanations, please search SCN for Navigation. There are lot of threads and blogs available
Regards,
Meganadhan S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ming,
Routing is preferred. For more info please look at the below references.
Targets(sap.ui.core.routing.Targets) : SAPUI5 Explored
Router(sap.ui.core.routing.Router) : SAPUI5 Explored
Thanks,
Naga
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.