我正在爲採購訂單開發fiori應用程序。 Im綁定標題數據,但我沒有綁定標題數據中的項目數據。 我的JSON數據:"E_HEADER":[ { "BUKRS":"9000", "EBELN":"4802000006", "LIFNR":"0000200040", "NAME_LIFNR":"TİC.LTD.Ş", "KUNNR":"", "NAME_KUNNR":"", "AEDAT":"2015-08-10", "ERNAM":"", "FRGGR":"10", "FRGKE":"X", "FRGRL":"X", "FRGZU":"", "FRGSX":"01", "WAERS":"USD", "ZTERM":"", "BEDAT":"2015-08-10", "EBELP":"00000", "NETWR_ITEM":0.0, "ITEM":[ { "EBELN":"4802000006", "EBELP":"00010", "MATNR":"000000004000000945", "MAKTX":"(ÇİFT)", "WERKS":"1000", "NAME_WERKS":" A.Ş.", "LGORT":"TS03", "LGOBE":"-Seym", "MENGE":0.0, "MEINS":"KI", "NETPR":1.5, "NETWR":0.0} ] },
SAP UI5表數據綁定JS
sap.ui.controller( 「sasony.Detail」,{ 的OnInit:函數(){
this.router = sap.ui.core.UIComponent.getRouterFor(this);
this.router.attachRoutePatternMatched(this._handleRouteMatched, this);
},
_handleRouteMatched: function(evt) {
this.catIndex = evt.getParameter("arguments").catIndex;
this.subCatIndex = evt.getParameter("arguments").subCatIndex;
var context = sap.ui.getCore().byId("App").getModel('header').getContext('/' + this.catIndex + '/ITEM/' + this.subCatIndex);
this.getView().setBindingContext(context,'item');
},
goBack: function() {
this.router.navTo("");
}
});
詳細視圖
var oTable = new sap.m.Table({ id:"oTable", inset : true, headerDesign : sap.m.ListHeaderDesign.Standard, columns : [ new sap.m.Column({ header :[ new sap.m.Label({text : "Belge No"}) ] }), new sap.m.Column({ header :[ new sap.m.Label({text : "Kalem No"}) ] }), ] }); oTable.bindItems("item>/", new sap.m.ColumnListItem("listItem",{ cells : [ new sap.m.Text({text : "{item>EBELN}"}), new sap.m.Text({text : "{item>EBELP}"}), ] }));
請幫助。
問候