I have a view, using: sap.ui.table. Which has an editable column: vkorg.
The column is bound to a model: myModel4
The xml:
<u:Table rows="{myModel4>/BacklogHeaderSet}" busy="false" id="table40" rowMode="Interactive" cellClick="onCellClick" >
The vkorg column:
<u:Column width="11rem" sortProperty="Vkorg" filterProperty="Vkorg">
<Label text="Vkorg."/>
<u:template>
<Input xmlns="sap.m" value="{myModel4>Vkorg}" id="input41" valueLiveUpdate="true" liveChange="onChange" submit="onSubmit"/>
</u:template>
</u:Column>
myModel4 is not created by default. There is a bind button. When I press it, I create the myModel4 dynamically:
onBind: function () {
var oModel = new sap.ui.model.odata.v2.ODataModel("/sap/opu/odata/sap/ZBAJUSZ_ODATA_BACKLOG_SRV/",
{defaultOperationMode: sap.ui.model.odata.OperationMode.Client});
oModel.setDefaultBindingMode(sap.ui.model.BindingMode.TwoWay);
var myTable = this.getView().byId("table40");
myTable.setBusy(true);
oModel.read("/BacklogHeaderSet", {
success: function (response) {
myTable.setBusy(false);
}.bind(this), error: function () {
myTable.setBusy(false);
}
});
this.getView().setModel(oModel, "myModel4");
},
As you see, it is working fine:
Running app screenshot
The model has a 2 way binding mode, and the input cell has valueLiveUpdate=”true”.
My problem is that when I change the content of the Vkorg cell, the myModel4 not get the values. It always contains the old values.
What can be the problem?
Thanks for the help.
I tried to check the data after Submit and change event of the input field, but myModel4 not updated automatically