Friday, 16 November 2018

SIMPLE LABEL SAPUI5
view.js
sap.ui.jsview("1.1", {
 
getControllerName : function() {
return "1.1";
},

 
createContent : function(oController) {
var Vbox = new sap.m.VBox({
id:"vid",
 
items:[
       new sap.m.Label({
      text:"Name",
      
       }),
       new sap.m.Input(),
       
       new sap.m.Label({
      text:"age", 
       }),
       new sap.m.Input(),
       
       new sap.m.Label({
      text:"company", 
       }),
   new sap.m.Input(),
       
       ]
}).addStyleClass("123");
 
var Vbo = new sap.m.VBox({
id:"vbox",
 
 
items:[
       new sap.m.Label({
      text:"date", 
       }),
       new sap.ui.commons.DatePicker(),
       
       new sap.m.Label({
      text:"address", 
       }),
       new sap.ui.commons.TextArea({
cols : 20,
rows : 5,
       }).addStyleClass("vbo"),
             
       ]
});
var oHBox1 = new sap.m.HBox({
id:"hb",
items:[
Vbox,Vbo,
 
]
}).addStyleClass("im");
 

  return new sap.m.Page({
title: "Title",
content: [
oHBox1
]
});
}

});

index.html

<!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,sap.ui.commons,sap.ui.core"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

<script>
sap.ui.localResources("1");
var app = new sap.m.App({initialPage:"id11"});
var page = sap.ui.view({id:"id11", viewName:"1.1", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page);
app.placeAt("content");
</script>
<style>
 
#vbox{
margin-left:700px;
padding-right:100px;
}

</style>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
OUTPUT


No comments:

Post a Comment

test ganaral binding(testing )

  /home/user/projects/project1/webapp/model/record.json: {     "text" : "outer text" ,     "myrecorsd" : [    ...