sap.ui.jsview("ui5p.Test01", {

    /** Specifies the Controller belonging to this View.
* In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
* @memberOf ui5p.Test01
*/
getControllerName : function() {
return "ui5p.Test01";
}, /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
* Since the Controller is given to this method, its event handlers can be attached right away.
* @memberOf ui5p.Test01
*/
createContent : function(oController) { var mtable=new sap.ui.table.Table('mtable',{title:'testtable'}); mtable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Last Name"}),
template: new sap.ui.commons.TextView({text:"{lastName}"})
})); // create some local data
var naughtyList = [
{lastName: "Dente", name: "Al", stillNaughty: true},
{lastName: "Friese", name: "Andy", stillNaughty: true},
{lastName: "Mann", name: "Anita", stillNaughty: false}
]; var oModel = new sap.ui.model.json.JSONModel();
//type 1
//oModel.loadData("http://localhost:8080/UI5P/ui5p/data01.json"); //type 2
oModel.loadData("./ui5p/data01.json"); //type 3
//oModel.setData(naughtyList); mtable.setModel(oModel);
mtable.bindRows("/"); return mtable;
} });
data01.json 文件内容

[
{"lastName": "Dente", "name": "Al"},
{"lastName": "Friese", "name": "Andy"},
{"lastName": "Mann", "name": "Anita"}
]

最新文章

  1. Fold Change和t分布
  2. 贪吃蛇,JavaScript,效果,鼠标事件
  3. 007商城项目:商品列表查询-需求分析,以及Spinmvc的访问知识
  4. mysql之各种命令总结
  5. IOS开发UI基础UISwitch属性
  6. php 同步因子的并发处理
  7. 二进制序列化框架easypack发布啦!
  8. Unity3D研究院之打开Activity与调用JAVA代码传递参数
  9. RichEdit中插入带背景色文本的一种思路
  10. FTP: Configuring server users..
  11. JAVA设计模式:蝇量模式
  12. Java面试总结(二)
  13. 用SpriteBuilder简化"耕牛遍地走"的动画效果(二)
  14. tensorflow 莫烦教程
  15. Skywalking部署常见问题以及注意事项
  16. C++ opencv调用resize修改插值方式遇到的坑
  17. 序言:我为什么学Perl
  18. vue+axios如何操作数据交互
  19. MVC中的Ajax与增删改查(一)
  20. kubernetes 实战5_命令_Assign Pods to Nodes&Configure a Pod to Use a ConfigMap

热门文章

  1. Activity、Fragment、ViewPage
  2. C#---爬虫抓取系列
  3. Memcache 一些经验和技巧
  4. 达夫设备之js
  5. (转载)Android项目实战(二十七):数据交互(信息编辑)填写总结
  6. The Vertica Analytic Database:C-Store 7 Years Later笔记
  7. 【摘录】JAVA内存管理-评估垃圾收集性能的工具
  8. Chrome Is The New C Runtime
  9. Python及相应软件安装
  10. jQuery 事件流的概念