Load entity without binding it to a view

后端 未结 1 541
别那么骄傲
别那么骄傲 2021-01-28 05:34

In a controller (Detail.controller.js) I want to access an OData-Entity that has not yet been bound to a control.

If the entry 0001 of my

相关标签:
1条回答
  • 2021-01-28 05:54

    To explicitly trigger a request to an entity you may use the read function of the oData model.

    Here is the official documentation:
    https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.model.odata.v2.ODataModel.html#read

    this.getView().getModel().read("/BananaSet('001')", {
        success: function (oData) {
            // do something with the Banana data
        }
    })
    
    0 讨论(0)
提交回复
热议问题