on 07-20-2017 3:29 PM
Hello Experts,
My requirement is to navigate from one view(master) to another view(detail) using Web IDE, but navigation is not working, Master view is displayed with Button as expected, but when i click on it, it should go to detail view which is not working, I don't see any errors other than "Failed to load resource: the server responded with a status of 404 (Not Found)", please help, here is code.
App View:
<App id="app"/>
View1 View:
<App>
<pages> <Page title="{i18n>title}">
<content> <Button text='Next' press="handleListItemPress"></Button>
</content>
</Page>
</pages>
</App>
Detail View:
<Page title="Title" showNavButton="true" navButtonPress="handleNavButtonPress"> <content>
<Text text="This is Detail Page"/>
</content>
</Page>
Root View: App
"sap.ui5": { "rootView": { "viewName": "HelloWorld.view.App", "type": "XML" },
View1.Controller.js
return Controller.extend("HelloWorld.controller.View1", {
handleListItemPress: function(evt) { var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("detail"); }
});
The "detail" route in the routes array has the pattern blank (""), it should be "pattern": "detail" instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.