Skip to Content
0
Jul 08, 2020 at 08:22 AM

Binding through this.getView (). ById ("myTable") does not work

408 Views Last edit Jul 08, 2020 at 08:23 AM 2 rev

Hello everyone,

Problem with binding of 2 tables in the DetailDetail View. There is a table with elements in the MasterPage, by clicking on one of the elements i need to open a detailView with 2 tables (with different IDs) and transfer data to them. Data is in the same data model, but in different arrays.

this.getView().bindElement– binding first table successful

this.getView().byId("positionTable")– binding doesn't work

Detail.controller.js

	_onProductMatched: function (oEvent) {
			
			this._product = oEvent.getParameter("arguments").product || "0";
			this.index = oEvent.getParameter("arguments").index || "0";
			this.getView().bindElement({
				path: "/anfragekurzdata/" + this.index, 
				model: "detail-data"
			});
			
////////////what i need to bind. this code doesn't work
			var oTable = this.getView().byId("positionTable");
			oTable.bindElement({
				path: "/positionendata/" + this.index,
				model: "detail-data"
			});