如何在 SAPUI5 中建立列表?


我已經過了一遍您的程式碼,看起來您的列表繫結不正確。繫結資料時,資料應採用 JSON 陣列格式。 請在下方查詢更新的工作程式碼。

示例

var oModelData =
[
  {Animal: "Kangaroo", Zoo: "Sydney"},
  {Animal: "Tiger", Zoo: "Melbourne"},
  {Animal: "Lion", Zoo: "Alaska"}
];
var oItem = new sap.m.StandardListItem({
   title : "{ Animal }",
   description : "{ Zoo }"
});
var oList = new sap.m.List({
   headerText:" Items",
   items: {
        path: "/",
        template: oItem
    }
});

希望對您有所幫助!

更新於:2019 年 12 月 12 日

899 次瀏覽

開啟您的 事業

完成課程並獲得認證

開始吧
廣告
© . All rights reserved.