Created
October 5, 2014 08:50
-
-
Save weiserman/2ef7bd0a844a34402a7f to your computer and use it in GitHub Desktop.
Hello World SAP UI5
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>SAPUI5 Hello World live demo</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | |
<script id="sap-ui-bootstrap" | |
type="text/javascript" | |
src="/temp/ui5/resources/sap-ui-core.js" | |
data-sap-ui-theme="sap_bluecrystal" | |
data-sap-ui-libs="sap.ui.commons"> | |
</script> | |
<!-- | |
data-sap-ui-themes: | |
- sap_bluecrystal | |
- sap_goldreflection | |
- sap_hcb | |
--> | |
<style type="text/css"> | |
/* here you could overwrite some sapui5 styles you don't like */ | |
</style> | |
<script type="text/javascript"> | |
sap.ui.getCore().loadLibrary("sample.uilib", "/temp/ui5/resources/sample/uilib"); | |
var oExample = new sample.uilib.Example({text : "Hello OpenUI5", tooltip : "My Tooltip"} | |
var oBtn; | |
//option 1: setting properties via constructor | |
oBtn = new sap.ui.commons.Button({ | |
text : "Hello World", | |
press : function (oEvent) { | |
alert(this.getText()); | |
} | |
}); | |
oBtn.placeAt("content"); | |
//option 2: setting properties via setters | |
oBtn = new sap.ui.commons.Button(); | |
oBtn.setText("show sapui5 version"); | |
oBtn.attachPress(function (oEvent) { | |
alert("sapui5 version = " + sap.ui.version); | |
}); | |
oBtn.placeAt("content2"); | |
</script> | |
</head> | |
<body class="sapUiBody" role="application"> | |
<div id="content"></div> | |
<br/> | |
<div id="content2"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment