我在運行中HCP本地應用程序檢查元素,id爲application-MaintainMasterData-display-component---addRoute--form
,但是當我部署到雲中,ID改爲application-MaintainFleet-Display-component---addRoute--form
爲什麼本地唯一ID與HCP中的ID不一致?
的應用程序的名稱改變,並在上流方式display
,這使我的sap.ui.getCore().byId()
在雲中失敗。我正在說明爲什麼會發生這種情況。
我讀過參考資料,我在事件處理程序中,我需要oEvent範圍,因此this.getView().byId()
和this.createId()
不適用於我。
編號:
sap.ui.getCore().byId() returns no element
https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/91f28be26f4d1014b6dd926db0e91070.html
========= ========= UPDATE
我也試過sap.ui.getCore().byId("application-MaintainMasterData-display-component---addRoute").byId("form")
,但同樣的問題,view id
在雲中是application-MaintainFleet-Display-component---addRoute
。
我想'deleteIcon.attachPress(this.onDeleteStop,這一點);'但是'onDeleteStop:功能(oEvent,oController){返回oController}','oController'是'undefined',我覺得我沒有」噸得到'設置對象語法'的重點? – Tina
它應該是'onDeleteStop:function(oEvent){console。日誌(本); }'。 *這個*是你的控制器或者其他*這個*是你提供給attach ...函數的。 – schnoedel
我已經將attachPress的代碼示例添加到我的答案中。 – schnoedel