Enabled "manifestFirst" doesn't load resources defined in sap.ui5
See original GitHub issueOpenUI5 version: All
URL (minimal example if possible): https://embed.plnkr.co/4mURwe/ (Update 2017.04.22: Added mandatory attributes in the app descriptor)
Steps to reproduce the problem:
- Define any CSS or JS
resources
in thesap.ui5
namespace of app descriptor - Enable
manifestFirst
either in the bootstrap configuration or in the component factory - If available, remove
manifest: "json"
from the component metadata in order to avoid loading the file twice.
What is the expected result? CSS and JS files are loaded and applied.
What happens instead? Requests for those files aren’t even sent.
Any other information? (attach screenshot if possible)
I couldn’t find any mention about this behavior in the documentation. The CSS and JS resources gets loaded when manifest: "json"
is defined in the component metadata. But this will send another request to manifest.json
even if the descriptor was loaded already through manifestFirst
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Descriptor for Applications, Components, and ... - SAPUI5 SDK
When loading with manifest first (by using the property manifest ), the resourceRoots are evaluated before the component controller is loaded. Otherwise, the ......
Read more >SAPUI5 Flexibility: Enable Your App for UI Adaptation
Use the flexEnabled flag. This flag in the manifest.json indicates that your application is enabled for UI adaptation. As of app descriptor schema...
Read more >Failed to load resource while consuming OData service
The reason behind that is simple: your customer for sure has more than one SAP Gateway/Fiori system. So you shouldn't hard code the...
Read more >SAP Tutorial: Complete CAP Java Part 3 | Nerd For Tech
We first start with an empty key. This tells the SAPUI5 framework that this is our default datasource, meaning that it doesn't need...
Read more >Implementing Re-use Components in SAPUI5 libraries and ...
Inside the manifest.json file of the component it's important to set sap.app.type to component. Furthermore, we have to set the relative path to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@boghyon that’s right. We’ve optimized the manifest loading internally to share it with the ComponentMetadata class. Sorry for not updating this issue. This was done with https://github.com/SAP/openui5/commit/0e271c9db0fbbd8a04b4c5a5a0e6abad8ed11808.
Yes, this is my design as the manifest loaded from a different location could have a different content than the one loaded from the default location. So we only share it in case the resulting URL would be the same.
Just to note down for other readers what I observed: Since 1.54.0 (and without Component-preload.js), the manifest file is not loaded twice anymore but only when there was a
name
provided in the component creation. E.g.:If a URL is given instead (
manifest: "myPath.json"
), the manifest file is loaded twice again.