Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html><head>
<meta name="description" content="UI5 MVC example with JS view" />
    <meta http-equiv='X-UA-Compatible' content='IE=edge' />
    <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
    
    <title>MVC in 22 Seconds Example</title>
    
    <!-- Load UI5, select gold reflection theme and the "commons" control library -->
    <script id='sap-ui-bootstrap' type='text/javascript'
        src='https://openui5.hana.ondemand.com/resources/sap-ui-core.js'
        data-sap-ui-theme='sap_bluecrystal'
        data-sap-ui-libs='sap.ui.commons, sap.ui.table'></script>
    
    </head>
    <body class='sapUiBody'>
        <div id='content'></div>
    </body>
</html>
 
var data = [
  {
    name: "Peter"
  },
  {
    name: "Mike"
  },
  {
    name: "Francois"
  },
  {
    name: "Thomas"
  }
];
        var oColumn = new sap.ui.table.Column({
            label: new sap.ui.commons.Label({text: "Name"}),
            template: new sap.ui.commons.TextView().bindProperty("text", "name"),
            sortProperty: "name",
            filterProperty: "name"
        });
        var oTable = new sap.ui.table.Table("nameTable", {selectionMode: "Multi", selectionBehavior: "Row"});
        oTable.addColumn(oColumn);
        var oModel = new sap.ui.model.json.JSONModel();
        oModel.setData(data);
        oTable.setModel(oModel);
        oTable.bindRows("/");
oTable.placeAt("content");
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers