我在运行中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