Failed to load UI5 component with properties .. Fiori Launchpad

你离开我真会死。 提交于 2019-12-08 04:14:14

问题


I've a custom control in my app. it run as a web application fine. but when i'm running with sap fiori launchpad it give me error. I've registered my control in my index.html file

    <script>
        sap.ui.localResources("sap.custom");
        sap.ui.localResources("sap.ui.codetools");
        sap.ui.localResources("libs");

    </script>

the structure of file directory is

If i remove my custom control then i can run my app in launchpad. Do I need to add some settings in my manifest file? What could be the reason for this error


回答1:


The common configuration for a Fiori tile is to point to the Component.js file. So the index.html is not called. The FioriLaunchpad.html plays the role of the index.html and the ComponentContainer is defined there. So register your path in the Component.js file.

init: function() {

        //load CodeEditor 
        jQuery.sap.registerModulePath("sap.ui.codetools", "/sap/ui/codetools/");

        UIComponent.prototype.init.apply(this, arguments);

        // set the device model
        this.setModel(models.createDeviceModel(), "device");
    }

in this way you can fix your problem




回答2:


The common configuration for a Fiori tile is to point to the Compopent.js file. So the index.html is not called. The FioriLaunchpad.html plays the role of the index.html and the ComponentContainer is defined there.

Try to register your custom control somewhere else within the app.



来源:https://stackoverflow.com/questions/43558379/failed-to-load-ui5-component-with-properties-fiori-launchpad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!