on 05-09-2018 2:31 PM
Hello all,
let us assume that we have a json with two trees of values. One tree, let's call it T_DATA contains the information of selected keys for the comboboxes, T_CELLS contain the items for the comboboxes lists.
There would be no problem if the combobox items were in the same tree with the selected key binding, but I can't change the json. Is this data binding possible?
oTable.addColumn(new sap.ui.table.Column({
label: new sap.m.Label({text: "Example"}),
template: new sap.m.ComboBox({
selectedKey: "{SALESORG}",
items: {
path: "???",
template: new sap.ui.core.ListItem({
key: "{V_KEY}",
item: "{V_VALUE}"
})
}
})
}));
oTable.bindRows("/T_DATA");
Thanks a lot!
check out this jsbin example below...
http://jsbin.com/weluxof/edit?html,output
Changed sap.ui.table.Table to sap.m.Table
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have made a jsbin example.
http://jsbin.com/yihewacipa/1/edit?html,output
This
path: "/T_CELLS/0/T_CELLS/0/T_DDLB",
must be changed.. the first 0 is hardcoded row number and the second 0 means that there can be more comboboxes on the same row.. so the factory function must somehow take into account only those items with the corresponding V_FIELDNAME, but I think I will be able to do this.. The first 0 is somehow impossible for me to solve 😞
thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use factory function...
Bind the table to T_DATA then in the factory function during the template creation access T_CELLS to perform binding to combobox.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.