Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Inline XMLViews into component-preload.js

$
0
0

Hi,

 

after reading some code & some posts on SCN I managed to write a simple grunt task that combines my components javascript code into a single component-preload. This works (or seem to work).

But I'd really like to include the views into this file, too.

I tried to inline them with sap.ui.xmlview(viewName, { viewContent: xmlSource }) but UI5 sends XHR requests anyways. Looking into the source for sap.ui.core.mvc.XMLView it seems to always send a request when a new view is instantiated. Is there a way to load/inline the view content once and use that for further instantiation?


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>