Created
July 16, 2014 10:02
-
-
Save themasch/c40726f1f48cd8cce5e9 to your computer and use it in GitHub Desktop.
inline xmlviews in ui5 component-preload.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!(function() { | |
if (!sap.ui.core.mvc.View.prototype_initCompositeSupport) { | |
try { | |
sap.ui.core.mvc.View(); | |
} catch (x) {} ; | |
} | |
var p = sap.ui.core.mvc.View.prototype, oI = p._initCompositeSupport; | |
p._initCompositeSupport = function(s) { | |
if (s.viewName) { | |
var vT = {"view.App": "<mvc:View xmlns=\"sap.m\" xmlns:mvc=\"sap.ui.core.mvc\" displayBlock=\"true\"> <Shell appWidthLimited=\"true\"> <App id=\"rootNav\"/> </Shell> </mvc:View>" /* ... */}; | |
if (vT[s.viewName]) { | |
s.viewContent = vT[s.viewName]; | |
delete s.viewName; | |
} | |
} | |
oI.apply(this, arguments); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment