SAPUI5 OData请求传参数,expand展现数据

来源:互联网 发布:淘宝网商贷额度没了 编辑:程序博客网 时间:2024/06/16 22:17

例如要传para1, para2, para3

这里写代码片var oModel = new sap.ui.model.odata.ODataModel(uri,                                   true,                                   user,                                   password,                                   headers);// Create a simple listvar oTemplate1 =    new sap.m.ColumnListItem({        cells : [ new sap.m.Text({                        text : "{MSG}"                    }),                   new sap.m.Text({                        text : "{ZCOUNTER}"                    })                ]    });oTable.setModel(oModel);// Bind the items and templateoTable.bindAggregation("items", {    path: "/CertificateSet",    parameters: {    expand: "XXXXSSet" ,                    custom:                        {   para1: "20130101",                            para2: "20120101" ,                            par3: "4"                        }    },     template: oTemplate1});
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34

如果 oData请求$expand=XXXXSSet,里面只有一条数据 

0 0
原创粉丝点击