Skip to content

Instantly share code, notes, and snippets.

@js1972
Created December 1, 2014 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save js1972/a7dec5f2d08f4dd256ec to your computer and use it in GitHub Desktop.
Save js1972/a7dec5f2d08f4dd256ec to your computer and use it in GitHub Desktop.
Test OpenUI5 load speed
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>test</title>
<script id="sap-ui-bootstrap"
xxxsrc="https://openui5.netweaver.ondemand.com/resources/sap-ui-core.js"
xxxsrc="https://oui5test.ap1.hana.ondemand.com/resources/sap-ui-core.js"
src="https://oui5test.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"
data-sap-ui-xx-bindingSyntax="complex">
</script>
<!-- XML-based view definition -->
<script id="view1" type="sapui5/xmlview">
<mvc:View
controllerName="local.controller"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m">
<!-- Add your XML-based controls here -->
<Button
icon="sap-icon://example"
press="clicked" />
</mvc:View>
</script>
<script>
// Controller definition
sap.ui.controller("local.controller", {
onInit: function(oEvent) {
// code
},
clicked: function(oEvent) {
jQuery.sap.require("sap.ui.commons.MessageBox");
sap.ui.commons.MessageBox.alert("Yep, you clicked the button. Well done!");
}
});
// Instantiate the View, assign a model and display
var oView = sap.ui.xmlview({
viewContent: jQuery("#view1").html()
});
oView.setModel(new sap.ui.model.json.JSONModel({
name: "value"
}));
oView.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application" id="content">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment