Skip to Content
0
Nov 22, 2020 at 02:47 PM

sap.m.combobox binding and setmodel within a sap.m.table

40 Views

I have a combobox defined in oTable >> sap.m.table and bind as below

oTable.bindItems("/Rowsets/Rowset/0/Row/", new sap.m.ColumnListItem({ cells : [ new sap.m.Text({ text : "{Char}"}), new sap.m.HBox({ items:[ new sap.m.ComboBox({ visible: {path:'SEL_SET1', formatter: function(sValue){ return sValue == "" ? false : true; }} }), new sap.m.Input({ visible: {path:'SEL_SET1', formatter: function(sValue){ return sValue == "" ? true : false; }} }), ] }), new sap.m.Text({ text : "{SysStatus}"})] }));

On model update of this table, want to update boxModel and combobox -- the below didnt work.

var x = sap.ui.getCore().byId("__box0")

xx.bindAggregation("items", "/Rowsets/Rowset/0/Row/",new sap.ui.core.Item({key:"{Key}",text : "{Text}"}));

xx.setModel(boxModel)