如何在 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
}
});希望能幫到你!
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP