JSFiddle - React, Tailwind, and code Playground

by indrajith patel

HTML

<script id='sap-ui-bootstrap' type='text/javascript' src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js' data-sap-ui-libs="sap.m, sap.ui.table, sap.ui.commons" data-sap-ui-theme="sap_bluecrystal">
    
</script>
<body class='sapUiBody'>
    <div id='content'></div>
</body>

JavaScript

sap.ui.controller("myController", {

    onInit: function () {
	
		
		var oModel = new sap.ui.model.odata.ODataModel("proxy/http/services.odata.org/V3/(S(hwii2w0uoa1wgczn3bian230))/OData/OData.svc/");
		oModel.oHeaders = {
				"DataServiceVersion" : "3.0",                   // first check the oModel data version, since we are using data version 3 in the 
																// in the service URL that we are accessing, we set out oModel version from 2 to 3
				"MaxDataServiceVersion":  "3.0"					// if not we get an error
					};
		
		sap.ui.getCore().byId("dropdownBoxid").setModel(oModel)
    }
});

// view part
sap.ui.jsview("myView", {

    getControllerName: function () {
        return "myController";
    },

    createContent: function (oController) {
        var dropdown = new sap.m.Select('dropdownBoxid');
		var itemTemplate = new sap.ui.core.Item({
			
			text : "{Name}",
			key :"{ID}"
		}); 
		
		dropdown.bindItems("/Products",itemTemplate)
		
		
		
		
		
        return new sap.m.Page({
            title: "Title",
            content: [
            dropdown

            ]
        });

    }
});

var app = new sap.m.App({
    initialPage: "idView1"
});
var page = sap.ui.view({
    id: "idView1",
    viewName: "myView",
    type: sap.ui.core.mvc.ViewType.JS
});
app.addPage(page);
app.placeAt("content");