How to retrieve View outside the controller - Openui5

前端 未结 3 902
甜味超标
甜味超标 2021-01-06 05:11

If I use this.getView() inside the controller of a view I can retrieve it without problems. How can I retrieve the view if I am outside the controller (e. g. in

3条回答
  •  醉酒成梦
    2021-01-06 05:20

    varRequired = sap.ui.getCore().byId("");
    

    this keyword refers to only the particular controller where as sap.ui.getCore() refers to the project views.

提交回复
热议问题