on 10-06-2017 11:21 AM
I want to navigate to another page after clicking a button on the first page but it shows nothing on the screen when I run in code in SAP WebIDE . It shows a light blue screen all around.
Are you using routing/event bus or normal navigation using sap.m.app methods. Depending on that, check where the call is being made to navigate. Maybe your view is not getting accessed properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay....As you are new to SAPUI5, I would suggest you to try out normal navigation first, before trying on routing. For normal navigation consider this scenario where you, create two views, each having a button, on clicking the buttons, the views navigate to one another. To achieve that you just declare the views, assign the views to the container (sap.m.App), and then on button click (in view), get the reference of the app and view, then use the 'to' method of app, to navigate between the views. If you need detailed code, go through the SAPUI5 demokit walkthrough, they have the app as well as the code for navigation. Here is the link :
https://sapui5.hana.ondemand.com/#/sample/sap.m.tutorial.walkthrough.31/preview
https://sapui5.hana.ondemand.com/#/entity/sap.ui.core.tutorial.navigation
Hope this helps,
Regards.
Hi Swapnil,
As in your manifest.json file you didn't defined routing for bookpage, define it in routes as well in targets
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "MyMovieApp.view",
"controlId": "app",
"controlAggregation": "pages",
"transition":"slide"
},
"routes": [
{
"pattern": "",
"name": "appHome",
"target": "home"
},
{
"pattern": "bookMovie",
"name": "bookpage",
"target": "bookMoviePage"
}
],
"targets": {
"home": {
"viewName": "View1",
"viewLevel": 1
},
"bookMoviePage": {
"viewName": "BookMoviePage",
"viewLevel": 2
}
}
}
Regards,
Vedaradhya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the browser javascript console for an error.
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
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.