SAPUI5 Smarttable how to use assocation in binding path

29 Views Asked by At

trying to build following scenario with 2 different smarttables: enter image description here

First table is attached to tab Materials, the second smarttable is attached to Orders tab. When the user selects one row and presses the Drill down button, I want to use the association to_Orders to get from the selected row to the underlying Order data and bind the data to the second smarttable.

On my controller function onDrillDown I get the selected row, but the binding part is unclear to me:

var gettingInternalTable = this.byId("table1_1").getTable(),
                gettingAllRows = gettingInternalTable.getRows(),
                oSelIndices = gettingInternalTable.getSelectedIndices();

var OrderTab1_2 = this.getView().byId("table1_2");
OrderTab1_2.setModel(oNewModel);
OrderTab1_2.setEntitySet('ZHUM_C_ORDERS');
            OrderTab1_2.setTableBindingPath("/ZHUM_C_MATERIALS('.1~KYM1.2~.3~.4~000000000000002200.5~KYM%20BET%20ECF%2090%201%203.6~110100.7~.8~TO')/to_ZHUM_C_ORDERS");
            OrderTab1_2.rebindTable(true);

Do I need to pass the values from the selected row to a filter one by one or is there a smarter way to do that directly with the association and how to bind this to the other table?

0

There are 0 best solutions below