【发布时间】:2022-12-03 13:14:51
【问题描述】:
我们必须执行编辑功能,我们必须考虑两种情况:
- 更改现有条目。
- 添加新条目并更新旧条目。
在第二种情况下,当我们尝试添加新条目时,它会添加到
sap.m.Table,但如果我们对旧条目进行任何更改,那么新添加的行项目就会消失。let oContextLineItemEntry = oLineItmTab.getModel().createEntry("/EntityName", { properties: NewLineItem, }); let oTmp = oLineItmTab.getBindingInfo("items").template, oItem = oTmp.clone(); oItem.setBindingContext(oContextLineItemEntry); oLineItmTab.addItem(oItem);这里
NewLineItem是我要添加的对象,它是空白的。它启动如下:NewLineItem = oLineItmTab.getItems()[0].getBindingContext().getObject();在此之后,我删除了 objects 属性的所有值。
我尝试使用 OData V2
OneWay绑定,但没有成功。我看到框架行为正在触发此交互
onChange started-
onChange completed我在 SAP Community 上回答了这些问题:
【问题讨论】: