Quantcast
Channel: SCN : All Content - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3285

SAPUI5 tutorial with sap ui5 controls

$
0
0

Hi,

 

I have created a SAPUI5 application project with "javascript" as view type.

 

I want a tutorial how to use controls in SAPUI5. I have used this link SAPUI5 SDK - Demo Kit

 

but at nothing is displayed in "sample1".

 

here is my code

<!DOCTYPE HTML>

<html>

    <head>

        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

 

        <script src="resources/sap-ui-core.js"

                id="sap-ui-bootstrap"

                data-sap-ui-libs="sap.m"

                data-sap-ui-xx-bindingSyntax="complex"

                data-sap-ui-resourceroots='{"view": "./"}'

                data-sap-ui-theme="sap_bluecrystal">

        </script>

        <!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

      

        <script>

                sap.ui.localResources("view");

                var app = new sap.m.App({initialPage:"idHelloWorld"});

                var page = sap.ui.view({id:"idHelloWorld", viewName:"view.HelloWorld", type:sap.ui.core.mvc.ViewType.JS});

                app.addPage(page);

                app.placeAt("content");

// create a simple button with some text and a tooltip only

var oButton1 = new sap.ui.commons.Button({

text : "Button",

tooltip : "This is a test tooltip",

press : function() {alert('Alert from ' + oButton1.getText());}

});

// attach it to some element in the page

oButton1.placeAt("sample1");

        </script>

    </head>

    <body class="sapUiBody" role="application">

        <div id="content">

          

        </div>

        <div id="sample1"></div>

    </body>

</html>


Viewing all articles
Browse latest Browse all 3285

Trending Articles



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