在设置我的xml模板的“rowSettings”聚合时,我想在xml模板中设置一个条件
sap.ui.table
.
以下是迄今为止我是如何尝试的(基于我发现的其他问题):
<table:Table id="changedData">
<table:columns>
<!-- Columns created in controller -->
</table:columns>
<table:rows>
<!-- Rows created in controller -->
</table:rows>
<table:rowSettingsTemplate >
<table:RowSettings highlight = "{= ${changedModel>highlight} == 'yellow' ? 'Warning' : ${changedModel} == 'green' ? 'Success' : 'None'}"/>
</table:rowSettingsTemplate>
</table:Table>
因此,“highlight”属性应该通知所需的高亮显示。
应为'}',而在表达式绑定{=${changedModel>中看到'=';highlight}=='黄色'?'警告':${changedModel}=='绿色'?'位置29处的Success':'None'}。
我的代码怎么了?
(3) [{â¦}, {â¦}, {â¦}]
0:
COL01: "00000000"
COL02: "Sonja"
COL03: "DeiÃenböck"
COL04: "Studentin"
COL05: "33403215"
COL06: "Hochschule München"
COL07: "TeststraÃe 2"
COL08: "20160115"
COL09: " 120.00 ⬠"
highlight: "yellow"
__proto__: Object
1:
COL01: "00000001"
COL02: "Leon"
COL03: "Maschine"
COL04: "Student"
COL05: "57945612"
COL06: "TUM"
COL07: "TeststraÃe 3"
COL08: "20160116"
COL09: " 160.00 ⬠"
highlight: "yellow"
__proto__: Object
2:
COL01: "00000002"
COL02: "Sabine"
COL03: "Betrieb"
COL04: "Studentin"
COL05: "45613789"
COL06: "LMU"
COL07: "TeststraÃe 4"
COL08: "20160117"
COL09: " 200.00 ⬠"
highlight: "yellow"
__proto__: Object
更改模型
{columns: Array(10), rows: Array(7)}
columns: Array(10)
0: {columnId: "COL01"}
1: {columnId: "COL02"}
2: {columnId: "COL03"}
3: {columnId: "COL04"}
4: {columnId: "COL05"}
5: {columnId: "COL06"}
6: {columnId: "COL07"}
7: {columnId: "COL08"}
8: {columnId: "COL09"}
9: {columnId: "highlight"}
length: 10
__proto__: Array(0)
rows: Array(7)
0: {COL01: "00000000", COL02: "Sonja", COL03: "DeiÃenböck", COL04: "Studentin", COL05: "33403215", â¦}
1: {COL01: "00000001", COL02: "Leon", COL03: "Maschine", COL04: "Student", COL05: "57945612", â¦}
2: {COL01: "00000002", COL02: "Sabine", COL03: "Betrieb", COL04: "Studentin", COL05: "45613789", â¦}