上のjavascript関数への "この" コンテキストを渡します。 「this」は認識されず、ヌル値を持ちます。私はこれではない非常にエレガントなソリューションを使用するために選んました:私は<a href="https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.ui.model.odata.ODataModel.html" rel="nofollow noreferrer">ODataModel</a>オブジェクトのfuncionを以下しているsapui
var viewCurrent = this.getView();
serviceModel.read(
"/Users(1)", {
success: function(userModel) {
viewCurrent.setModel(userModel, "userAuthenticated");
},
error: function(error) {
},
context: this
}
);
とにかく、私は、パラメータとして「この」コンテキストを渡すための正しい方法でどのようにしたいと思います。
ありがとうございました。