I am extending an existing FIORI application. The app is a master-detail app. I'm having problems on navigation to our custom details page. I am using SAP WEB IDE by the way.
Here is the piece of code I implemented on the controller of the master view. I can get Matnr with no problems.
this.oRouter.navTo("newView",{
Matnr : i.getBindingContext().getProperty("Matnr")
});
Here is a part of my component.js
this.cus.sd.salesorder.create.Component.extend("cus.sd.salesorder.create.SD_SO_CREExtension.Component", {
metadata: {
version: "1.0",
routing:
{
"routes" : {
"newView": {
"pattern": "newView/{Matnr}",
"view":"cus.sd.salesorder.create.SD_SO_CREExtension.view.CustomView",
}
},
},
Here is my CustomView view
<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
controllerName="cus.sd.salesorder.create.SD_SO_CREExtension.view.CustomView" xmlns:html="http://www.w3.org/1999/xhtml">
<App>
<pages>
<Page title="Title">
<content>
<Label text = "hello"></Label>
</content>
</Page>
</pages>
</App>
</mvc:View>
And here is the controller
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function(Controller) {
"use strict";
return Controller.extend("cus.sd.salesorder.create.SD_SO_CREExtension.view.CustomView", {
onInit: function() {
alert("hello");
},
});
});
Upon checking the URL it seems to be accessing it
....sap-ui-xx-componentPreload=off&origional-url=index.html&sap-ui-appCacheBuster=..%2F#&/newView/14
But I cannot see any label component.