[英]SAP Fiori Launchpad Custom App Error: Cannot instantiate object: “new” is missing
After trying to start our custom developed SAPUI5 app in the fiori launchpad, we received following error message: 尝试在fiori启动板中启动我们定制开发的SAPUI5应用程序后,我们收到以下错误消息:
LPD_CUST Settings: LPD_CUST设置:
LPD_CUST_settings LPD_CUST_settings
Component.js Component.js
sap.ui.define([
"sap/ui/core/UIComponent"
], function (UIComponent) {
"use strict";
return UIComponent.extend("***.***.***.Component", {
metadata : {
manifest: "json"
},
init : function () {
UIComponent.prototype.init.apply(this, arguments);
}
});
});
Target Mapping: 目标映射:
Semantic Object: 语义对象:
Semantiv Object YCEI_BPUPLOAD_SEM exists in the Transaction /n/UI2/SEMOBJ 事务/ n / UI2 / SEMOBJ中存在语义对象YCEI_BPUPLOAD_SEM
The App is starting as a standalone application via the index.html. 该应用程序通过index.html作为独立应用程序启动。 But if we try to launch it on the SAP Fiori Launchpad, the error message appears.
但是,如果我们尝试在SAP Fiori Launchpad上启动它,则会出现错误消息。
We also tried following component.js where we entered the value of the Additional Information property in the LPD_CUST transaction but we received the same error. 我们还尝试了以下component.js,我们在LPD_CUST事务中输入了附加信息属性的值,但收到了相同的错误。
jQuery.sap.declare("***.***.***.Component");
sap.ui.core.UIComponent.extend("***.***.***", {
createContent : function() {
// create root view
this.view = sap.ui.view({
id : "app",
viewName : "***.***.***.view.App",
type : sap.ui.core.mvc.ViewType.XML,
viewData : { component : this }
});
return this.view;
}
});
(*** are internal components/paths) (***是内部组件/路径)
All hints are appreciated. 所有提示表示赞赏。
Regards, 问候,
Dominic 多米尼克
The error message is linking you to the controller of your application. 该错误消息将您链接到应用程序的控制器。 Please make sure you instantiated the objects correctly.
请确保正确实例化了对象。 Maybe there is a problem with instantiating an OData Model.
实例化OData模型可能存在问题。 Check if you use "new".
检查是否使用“新”。 See syntax below:
请参见下面的语法:
https://ui5.sap.com/#/topic/6c47b2b39db9404582994070ec3d57a2.html https://ui5.sap.com/#/topic/6c47b2b39db9404582994070ec3d57a2.html
You need to use "new" when instantiating an object, for example on your second option: 实例化对象时,例如在第二种选择上,您需要使用“ new”:
this.view = new sap.ui.view({
id : "app",
viewName : "***.***.***.view.App",
type : sap.ui.core.mvc.ViewType.XML,
viewData : { component : this }
});
I don't think that's the answer to your problem, but I think it was an error and maybe it can help you somehow. 我认为这不是您问题的答案,但我认为这是一个错误,也许可以以某种方式帮助您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.