Skip to Content
0

How does sap-ui-core.js decide what files to load?

Jan 20, 2017 at 12:43 AM

71

avatar image

I am working with the IoT Application plugin to WebIDE. When I generate a new project, I specify that I want to see an Analysis Page, a Thing Details page, and a Landing Page. I see that WebIDE generates webapp controller files (AnalysisPage.controller.js, ThingPage.controller.js, and LandingPage.controller.js) for each of the pages listed above. Nonetheless, the only script that is loaded by sap-ui-core.js is the Landing Page script. What criteria does sap-ui-core.js use in order to load files?

Thanks.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Praharshana Perera
Jan 24, 2017 at 03:29 PM
1

I m not sure but I think that SAP UI5 loads files (dependencies) on demand (when they are needed) unless you have a preload file which has all the files minified together. To render the first view you need the controller (LandingPage.controller.js) and an additional dependency (XmlFragmentDialogLoader.js). So UI5 just loads these two files and render the view. If you do a navigation to a second view (AnalysisPage), then the other files will be loaded as well. Hope this helps ☺

Share
10 |10000 characters needed characters left characters exceeded