Hi,
I've an issue using a checkbox in a table - sap.m.Table - (not for row selection; only some of the rows can be selected). If I change the state of the checkbox (clicking in UI :-) ) the model is not updated and this.getModel().submitChanges(); will submit nothing. I tried several approaches, but nothing solved the issue. (The table also has some input fields and any change to these input fields is stored in the model and submitChanges triggers the correct OData calls.)
Current code (version 1):
var checkBox = new sap.m.CheckBox({
editable: true,
visible: "{= ${placed} === '1'}",
selected: "{= ${picked} === '1'}"
});
==> Table shows checkbox with correct values
version 2:
var checkBox = new sap.m.CheckBox({
editable: true,
visible: "{= ${placed} === '1'}",
});
checkBox.bindProperty("selected", {
targetType: "boolean",
path: "picked",
mode: "sap.ui.model.BindingMode.TwoWay"
});
==> No data is shown in table (loading indicator is shown, but nothing happens); console shows no relevant error; same result if using selected: "{path : 'picked', type : 'sap.ui.model.type.Boolean' }"
Any hints how to solve that issue?
Thanks!
Regards
Karsten