詳細ビューのナビゲーションにルーティングを使用したいのですが、次のエラーが発生します。
キャッチされていない TypeError: sap.ui.core.UIComponent.getRouterFor は関数ではありません
以下にComponent.jsが表示されます
jQuery.sap.declare("iwstoolbarui5.Component");
sap.ui.core.UIComponent.extend("iwstoolbarui5.Component", {
metadata : {
rootView : "iwstoolbarui5.Main",
routing : {
config : {
targetsClass : "sap.m.routing.Targets",
viewPath : "iwstoolbarui5",
targetControl: "mainApp",
controlId : "mainApp",
controlAggregation : "detailPages",
viewType : "XML"
},
routes:[
{
pattern : "BPIdent",
name : "Main",
view : "Main",
viewLevel : 0,
targetAggregation : "masterPages",
targetControl : "mainApp",
subroutes : [
{
pattern : "/bpident:",
name : "BPIdent",
view : "BPIdent.BPIdent",
viewLevel : 1,
targetAggregation:"detailPages",
subroutes : [
{
pattern : "/accounts",
name : "Accounts",
view : "BPIdent.Accounts",
viewLevel : 2,
targetAggregation:"detailPages"
}
]
},
init : function() {
sap.ui.core.UIComponent.prototype.init.apply(this, arguments);
this.gerRouter().initialize();
}
これはBPidentの私の機能です(これは私の詳細ページの1つです)
selectInteraction: function(event) {
var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
this.showDetail(event.getParameter("listItem") ||event.getSource());
},
showDetail : function(oItem) {
var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
sap.ui.core.UIComponent.getRouter(this).navTo("BPIdent", {
from: "master",
BPIdent: oItem.getBindingContext().getPath().substr(1)});
},
これは私のインデックスの一部です:
sap.ui.getCore().attachInit(function() {
new sap.ui.core.ComponentContainer({
name : "iwstoolbarui5"
});
});
誰でもこれについて私を助けることができますか?