handleListItemPress: function (evt) {
var imp = evt.getSource().getTitle(); //don't declare globals variables
// var mystring = 'this,is,an,example';
var splits = imp.split(",");
//build json object with all your properties you want to send
var context = {
dino: splits[0],
revno: splits[1],
uruntipi = splits[2],
bindingContext = evt.getSource().getBindingContext()
};
this.oRouter.navTo("Detail", context);
//OR sap.ui.core.UIComponent.getRouterFor(this).navTo("Detail", context);
//this.nav.to("Detail", context);
}
詳細頁:
onInit: function() {
var oRouter = sap.ui.core.routing.Router.getRouter("appRouter");
//can also use directly this.oRouter.attachRouteMatched(...)
oRouter.attachRouteMatched(function (oEvent) {
if (oEvent.getParameter("name") !== "detail") {
return:
}
var dino = oEvent.getParameter("arguments").dino;
var revno = oEvent.getParameter("arguments").revno;
var uruntipi = oEvent.getParameter("arguments").uruntipi;
var bindingContext = oEvent.getParameter("arguments").bindingContext;
}, this);
}
在這裏閱讀更多Methods and Events for Navigation
可能重複的[UI5 - 視圖之間傳遞數據](https://stackoverflow.com/questions/34000949/ui5-passing-data-between-views) – boghyon