I am trying to do a navigation function from the controller, in the controller create a table with a list of oData records, now I want to sign a navigation to the items in the table.
this is my code and i don't know what i'm doing wrong
...
var colItems = new sap.m.ColumnListItem("colItems", {
type: "Navigation",
press: "onPress",
});
...
onPress: function (oEvent) {
var oItem = oEvent.getSource();
var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
oRouter.navTo("DetalleOficina", {
invoicePath: oItem.getBindingContext("invoice").getPath().substr(1)
});
},
The page to which I want to point the navigation is "DetalleOficina.view.xml".
I found it in this link, https://sapui5.hana.ondemand.com/1.36.6/docs/guide/e5200ee755f344c8aef8efcbab3308fb.html
What do you recommend that I do?.
Greetings from Colombia.