[英]Why am I getting this error? Error: Unable to locate a 'Type' by the name: 'User:#Default'
[英]Why am I getting oEvent.getParameter('data') undefined on dataReceived event?
this.getView().bindElement({
path: `/Employees('${this._userId}')`,
parameters: { expand: 'aaa,bbb,ccc' },
events: {
dataReceived: (oEvent) => {
this.getView().setBusy(false)
debugger
}
}
});
我可以在$batch
請求的響應中看到數據。 當我在dataReceived
function 處理程序中放置斷點時,我還可以通過this.getView().getModel().getProperty(this.getView().getBindingContext().getPath())
查看數據。 參數oEvent.mParameters.data
存在,但值為undefined
。
如果我遺漏了expand
,則data
已設置。 關聯實體集的所有實體都需要與其父實體關聯嗎?
這是根據 dataReceived 的dataReceived
參考設計的:
數據接收
[...]發生錯誤時也可能觸發此事件。
參數 類型 描述 數據 細繩 收到的數據; 在錯誤情況下 undefined
您必須在 $batch 響應中的某處有錯誤消息,或者請求以某種方式中止。
缺少的data
參數是目前唯一記錄在案的bindObject
/ bindElement
請求失敗的指標。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.