为什么我会在DataReceived事件上获得oevent.getParameter(data')?
this.getView().bindElement({
path: `/Employees('${this._userId}')`,
parameters: { expand: 'aaa,bbb,ccc' },
events: {
dataReceived: (oEvent) => {
this.getView().setBusy(false)
debugger
}
}
});
我可以在$ batch
请求的响应中看到数据。 当我在datareceived
函数处理程序中放置一个断点时,我还可以通过this.getView()。getModel()。getProperty(this.getView().getBindingContext())。 getPath())
。 参数oevent.mparameters.data
存在,但是该值是undefined
。
如果我忽略展开
,则设置了数据
。关联实体集的所有实体是否需要与其父母建立关联?
this.getView().bindElement({
path: `/Employees('${this._userId}')`,
parameters: { expand: 'aaa,bbb,ccc' },
events: {
dataReceived: (oEvent) => {
this.getView().setBusy(false)
debugger
}
}
});
I can see data in the response of the $batch
request.
When I put a breakpoint in the dataReceived
function handler, I can also see the data via this.getView().getModel().getProperty(this.getView().getBindingContext().getPath())
.
The parameter oEvent.mParameters.data
exists, but the value is undefined
.
If I leave out expand
, the data
is set. Do all entities of an associated entityset need to have an association to its parent?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
This is by design according to the API reference of
dataReceived
:您必须在$ batch响应中有一个错误消息,否则请求以某种方式中止了。
缺少
数据
参数当前是bindobject上的失败请求的唯一记录指标
/bindelement
。PS:另请参阅 https://github.com/sap/sap/sap/openui5/issues/2263
This is by design according to the API reference of
dataReceived
:You must have somewhere an error message in the $batch response, or the request was somehow aborted.
The missing
data
parameter is currently the only documented indicator for a failed request onbindObject
/bindElement
.PS: See also https://github.com/SAP/openui5/issues/2263