应用程序可从WebIDE完美运行,但不能从启动板运行

问题描述 投票:0回答:1

我创建了一个可以从WebIDE完美运行的应用程序。我将其部署到启动板,从那里调用它时出现错误

Uncaught (in promise) TypeError: Cannot read property 'then' of undefined
    at f._bindNewContext (Component-preload.js:10)
    at f.<anonymous> (Component-preload.js:10)

是否有问题

调用这三个函数时肯定有一些错误,但我找不到它。

handleMatchedDetail: function (oEvent) {

            this.getModel().metadataLoaded().then(function () {
                this._bindNewContext();
            }.bind(this));
        },
_bindNewContext: function () {

    this.getModel().resetChanges().then(

        this.oContext = this.getModel().createEntry("/Kardex01Set", {
            success: this._successSave.bind(this),
            error: this._errorSave.bind(this)
        })
    );
...//some more code
}

此编码有误吗?从启动板调用应用程序时,此错误还可能是什么原因?

非常感谢

sapui5 launchpad
1个回答
0
投票

v2ODataModel.resetChanges()返回promise only since 1.65.0。在以前的版本中,它返回undefined

© www.soinside.com 2019 - 2024. All rights reserved.