0
点赞
收藏
分享

微信扫一扫

Demo:Repeater 控件显示Message_SAP刘梦_新浪博客


Repeater 控件用于显示重复的项目列表,这些项目被限制在该控件。Repeater 控件可被绑定到数据库表、XML 文件或者其他项目列表。

效果图

代码

 

<script>

// create data

var oJsonData = {

"data" : [ {

"index" : "0",

"level" : "Success",

"description" : "Performance is good"

            },

            {

"index" : "1",

"level" : "Warning",

"description" : "Service not available."

            }

        ]};

    

//create model

var oModel = new sap.ui.model.json.JSONModel();

    oModel.setData(oJsonData);

    sap.ui.getCore().setModel(oModel);

// create Row template

var oRowtmplt = new sap.ui.commons.Message("msg",{

"{description}",

"{level}"

    });

      

    

// create RowPepeater and bingding msg

var oRowPt = new sap.ui.commons.RowRepeater();

 

oRowPt.bindRows("/data",oRowtmplt);

      

oRowPt.placeAt("content");

 

    

</script>

 


举报

相关推荐

0 条评论