sapui5 - 你能在 SAPUI5 的一个列表中加入两个 oModel
问题描述
您好我正在尝试显示一个从两个不同的 oModel 获取数据的列表。
var Countries = {
"countries":[
{
'country' : "AUS",
'country_name' : "Australia"
},
{
'country' : "USA",
'country_name' : "United States of America"
},
]
};
var CountriesStatus = {
"countries":[
{
'country':"AUS",
'status':"inactive"
},
{
'country':"USA",
'status':"active"
}
]
};
Countries>country_name
是否可以加载标题和描述的单个列表CountriesStatus>status
解决方案
据我所知,这是不可能的。ListBinding只接受一个模型。这意味着,如果要绑定聚合,则必须将数据加入单个模型并绑定该模型。
推荐阅读
- c++ - C++ 中的集合(异构类型的数组)
- c# - 我该如何正确计算?
- sql-server - 在 .NET Core 应用程序中执行原始 SQL 查询
- c# - WPF C#更改单选按钮中文本块的背景颜色
- java - 使用部分单词匹配而不是余弦相似度在java中搜索2个字符串的相似度
- python - How to run classify_image on multiple GPU?
- php - PHP/SQL - 嵌套语句?
- javascript - 如何使用 jest 测试模块,该模块导入作为构造函数的外部库
- c++ - 可以使用 std::variant 的 std::variant 吗
- charts - Power BI 中 1 个图表中的不同颜色